Actions
Bug #280
closedFor loop misses first iteration in some cases.
Start date:
03/01/2020
Due date:
% Done:
0%
Estimated time:
Affected version:
Description
For loops should ALWAYS complete the first iteration (even if the Step is in the wrong direction), but in AOZ they don't.
(This is probably related to bug #259. I've included a similar example here.)
I'm guessing this is because the comparison is being done at the For instead of at the Next, as it should be.
In the 3 test cases shown in the following example, AOZ fails the first (and only) iteration:
#manifest:"pc"
#splashScreen:false
Print "2 To 1"
For x=2 To 1
print x
Next x
Print "1 To 2 Step -1"
For x=1 To 2 Step -1
Print x
Next x
Print "1 To 1"
For x=1 To 1
Print x
Next x
Print "Done"
Results (FAIL):
2 To 1
1 To 2 Step -1
1 To 1
Done
Result SHOULD be:
2 To 1
2
1 To 2 Step -1
1
10 To 10
10
Done
Actions