Originally Posted by Lonewolf10
I personally don't understand lines such as:
I in A? If I=1 what does A equal? 1?
just recalling the original example...
Let A=0 To 10 Step 2 For I in A ...A equals "0 To 10 Step 2", or to put it another way, [0, 2, 4, 6, 8, 10]
The suggestion is to allow users to assign ranges
to variables (and use type inference to allow different types to be assigned to variables).
One could just as easily write it in-line, of course, like so:
For I in 0 To 10 Step 2
where the only difference there between that and normal BASIC syntax is the use of "in" instead of "="; because it is not assigning I to the range, but to each element in
the range in turn. Thus the symbols "To" and "Step" have meanings of their own, and are not just part of For's special syntax.