[Color Computer] [Coco] Bug in FOR NEXT ?
Alex Evans
alxevans at concentric.net
Sat Jun 3 17:21:05 EDT 2006
On Jun 2, 2006, at 11:23 PM, Willard Goosey wrote:
> That's a Pascal-ism, actually.
>
> The thing that surprised ME when I ran across it in BASIC is that
> FOR-NEXT loops always go through the loop at least once, even in cases
> like:
> 10 A=0
> 20 FOR B=1 TO A
> 30 REM DO SOMETHING
> 40 NEXT B
>
> Willard
Not really surprising considering that you can either test at the
bottom or at the top and testing at the bottom creates an
unconditional branch at the bottom of the loop.
More information about the Coco
mailing list