Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Loopin a variable length array
Message
De
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:
00189783
Vues:
13
>James,
>
>lnControls = ALEN(Thisform,.array,1)
>FOR lnCnt = 1 TO lnControls
> * Do the recalc.
> lnControls = ALEN(Thisform.Array,1)
>ENDFOR


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.

When I have had to do this type of thing before I found it easiest to have all the possible dependencies defined during the init phase. Then you have a fixed length array.
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform