Problem with that is that the second "Print ii" statement is executed, even if the loop is skipped (because of initial conditions). The SuperBASIC version would print nothing if the initial loop conditions indicate it should be skipped
The Gambas equivalent would be more like For ii = 0 to 254 Print ii Next If (some test by which we can tell the loop has iterated at least once) Then Print ii End If Also, an EXIT statement in the loop would leave the SuperBASIC FOR loop, skipping the loop epilogue (the bit between the NEXT and the END FOR). A better trivial example of the loop epilogue in action might be: FOR character = 1 to LEN$(test$) IF test$(character) == "@" THEN EXIT character NEXT character REMark Character not found character = 0 END FOR character IF character THEN PRINT test$(1 TO character-1) & test$(character+1 TO ) ELSE PRINT "Not found" END IF ------------------------------------------------------------------------------ Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user