|
|
| Author |
Message |
sparxfly
Joined: 19 Dec 2005
Posts: 4
Location: New Zealand
|
|
Posted: 14 January 2006, 18:36 PM Post subject: Handling decrementing for...next loop indices |
|
|
Converting my project across from BasicX to ZBasic, I am getting warnings where I use for...next loops with decrementing loop indices.
They worked fine for BasicX, seem also work fine for ZBasic.
Looks like the error checker doesn't correctly handle decrementing indices.
eg
public const windqsize as byte = 60
dim loopctr as byte
for loopctr = windqsize to 1 step -1
...
...
next
Gives...Warning: For loop will never be executed |
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR
|
|
Posted: 14 January 2006, 20:11 PM Post subject: |
|
|
| Quote: | | Looks like the error checker doesn't correctly handle decrementing indices. |
Version 1.1.0 does indeed have that problem. The problem was fixed about a week ago and the testing of the solution (along with some other changes) is nearly completed.
We expect to post an update soon, perhaps this next week. To work around the problem in the interim, add the line below to the top of your .pjt file:
| Code: | | --optimize=no-unreachable-code |
|
|
| Back to top |
|
 |
|