Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to declare variables 1,2,3,4,5,etc
Message
De
04/06/2003 18:03:53
 
 
À
04/06/2003 17:26:41
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00796388
Message ID:
00796431
Vues:
12
>>local 1,2,3,4,5,6,7
>>
>>i want to store a value for each variable.
>>
>>Thank you very much.
>
>For a group of related variables, you would use an array.
>
>Here is an example, to store 10 different values:
>
>
>dimension MyValues(10)
>for i = 1 to 10
>  MyValues = i * 10
>next
>
>? MyValues(1) && 10
>? MyValues(3) && 30
>
>
>HTH,
>
>Hilmar.

No it won't. You'll have an array MyValues with 10 entries of 100. You need MyValues[i] = i * 10 to get individual values.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform