[Color Computer] [Coco] Bug in FOR NEXT ?

Willard Goosey goosey at virgo.sdc.org
Sat Jun 3 05:23:15 EDT 2006


>Date: Thu, 1 Jun 2006 17:59:41 -0500
>From: Frank Pittel <fwp at deepthought.com>
>
>I always that the loop counter was "undefined" outside the loop. 

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 
-- 
Willard Goosey  goosey at sdc.org
Socorro, New Mexico, USA
"I've never been to Contempt!  Isn't that somewhere in New Mexico?"
   --- Yacko



More information about the Coco mailing list