[Coco] Re: More on FOR-NEXT
Diego Barizo
diegoba at adinet.com.uy
Tue Jun 13 19:01:24 EDT 2006
I am mostly worried about memory usage and/or slowdown because the loop
is not completed.
I'm guessing memory should not be a big issue...
Diego
Arthur Flexser wrote:
> But using his first example rather than the second doesn't affect anything
> you've mentioned. Merely setting the loop variable to the value it would
> normally have on loop completion doesn't affect the presence of leftover loop
> stuff on the stack if you exit the loop with a GOTO.
>
>
>>
>> ----------------- Original Message ----------------------
>> 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
>>
>>
>>
>> --
>> Coco mailing list
>> Coco at maltedmedia.com
>> http://five.pairlist.net/mailman/listinfo/coco
>>
>>
>
>
>
More information about the Coco
mailing list