Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with array elements as loop counters
Message
 
 
To
30/08/2003 10:29:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00824765
Message ID:
00824875
Views:
25
Hi Oscar,

It's documentation error. You cannot use an array element in the FOR loop and I'm not sure why would you need that.

>Hello
>Try this in Vfp7 or 8:
>DIMENSION aInd[10]
>FOR aInd[1] = 1 TO 20
>	? aInd[1]
>ENDFOR
>
>I get "aInd is not a variable"
>
>However, this should work according to FOR..ENDFOR help:
>"Var
>Specifies a variable or an array element that acts as the counter. The variable or array element doesn't have to exist before FOR ... ENDFOR is executed"
>
>Am I missing something?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform