Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Loopin a variable length array
Message
De
21/02/1999 12:29:41
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
 
À
21/02/1999 08:32:02
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00189697
Message ID:
00189802
Vues:
20
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform