V6-not-optim, V6-Debug, and V6-optimised give not the same nested FOR-NEXT execution

dan kabestan

Member
Licensed User
Longtime User
Pasting a current job from V580 to V6 i found a new infinite loop.
Searching a solution i found two different results in nested FOR-NEXT loop execution.
Between Debug mode or normal compilation and, the Optimised compilation.
This last forbids (or dont take care, the same thing) to modify a for-next-loop variable inside the loop !
That is new, its more strong severity than Ada.

Would you see the next script :
'---------------------------------------
'listbox1 declared
Sub test
For n =1 To 6
For p = 1 To 5
listbox1.Add("____n=" & n & " p=" & p)
If p = 2 Then : p=4 : listbox1.Add(" p=2 change_to p=4 ") : End If
If n = p Then : listbox1.Add(n & " [n = p decide_to EXIT_n]") : Exit : End If
Next
Next
End Sub
'-----------------------------------------
And the joint result files.

So, as you want, but it could be great that the help inside b4ppc be update with the release and
the DEBUG run same as the Super fast & Extra-compacted-code Optimised_Compiler....
thanks for help.
 

Attachments

  • Image3.jpg
    Image3.jpg
    18.7 KB · Views: 219
Top