[Coco] Bug in FOR NEXT ?

Diego Barizo diegoba at adinet.com.uy
Thu Jun 1 00:23:09 EDT 2006


I can't believe that after +20 years with the CoCo I never got into 
this... weird.
Thanks


Benoit Bleau wrote:

>>
> Diego,
> That's not a bug... In (at least the coco) basic, the "for-next" 
> variable  contains +1 at the end of the loop.
> Try this:
> 10 FOR A=1 to 10: NEXT
> 20 PRINT A
>
> This should print 11.
>
> In your case, if I understand correctly, you're executing a subroutine 
> if A$=B$, then you're starting the FOR loop again after that, right?
> If that's what you wanted, in line 1070, A would be set to 73, because 
> the condition A$=B$ was false for the 72 tries...
>
> -Benoit
>
>



More information about the Coco mailing list