[Coco] %% in FOR-NEXT

Wayne Campbell asa.rand at gmail.com
Sat May 8 15:50:31 EDT 2010


I don't know if you are referring to Basic09 syntax, or DECB BASIC syntax. 
In Basic09, The value following the TO directive is a number reflecting the 
upper bound of the loop. It can be a whole number (integer), or a floating 
point number (real). A variable of the correct type can be used as this 
value.

FOR i := 1 TO 10
FOR i := .0001 TO .0010
FOR i := 1 TO upper_value

IF the STEP value is included, that value determines how the loop is 
incremented, or decremented.

FOR i := 1 TO 1000 STEP 10
FOR i := 1000 TO 1 STEP -10

Wayne

----- Original Message ----- 
From: "John Guin" <johnguin at hotmail.com>
To: <coco at maltedmedia.com>
Sent: Saturday, May 08, 2010 11:59 AM
Subject: [Coco] %% in FOR-NEXT


> Say all,
>
> I've been seeing this construct is some BASIC FOR-NEXT loops:
>
> FOR N =1TO%%
>
> I don't have a machine to test this on right now - any idea what the %% is
> for?  Is this legit or a typo?
>
> Thanks,
> John
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco 




More information about the Coco mailing list