Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Loopin a variable length array
Message
From
21/02/1999 12:29:41
 
 
To
21/02/1999 08:32:02
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00189697
Message ID:
00189802
Views:
21
PMFJI-

Right. That's how a FOR loop works. The FOR line only executes once. Which is nice: it's far more efficient and you could do
FOR lnCnt = 1 TO ALEN(Thisform,.array,1)
If your loop is variable, then IMHO a FOR LOOP is the wrong one to use. Far better to use a DO WHILE.


>No good, because ...
>LOCAL x, y
>y = 10
>for x = 1 to y
> ? x
> IF x = 5
> y = 15
> ENDIF
>ENDFOR
>
>
>Only prints from 1 to 10.
Previous
Reply
Map
View

Click here to load this message in the networking platform