[Coco] More on FOR-NEXT

Diego Barizo diegoba at adinet.com.uy
Sun Jun 11 14:04:38 EDT 2006


When forcing an exit from a FOR-NEXT loop, does it make any difference 
to do a clean exit, by manually changing the variable value and GOTOing 
to the NEXT line, or is it the same that just GOTO?
Ex:
10 FOR A=1 TO 10
20 IF P=3 THEN A=11:GOTO  30
30 NEXT A
40 REM REST OF THE PROGRAM

 is any better than

10 FOR A=1 TO 10
20 IF P=3 THEN 40
30 NEXT A
40 REM REST OF THE PROGRAM

Diego




More information about the Coco mailing list