Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Array - Adding lines
Message
De
13/11/2001 21:30:51
Wilfred Chan
Bnp Paribas Hong Kong Branch
Hong Kong, Hong Kong
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00581261
Message ID:
00581278
Vues:
22
>Hi,
>
>I'd like to create a new array called MyArray[2,3] and then, adding values like this:
>
>Declare MyArray[2,3]
>MyArray = "a", 2, .T., "b", "c", 3
>
>Is it possible? Any user function?
>
>[]'s
>
>Rodolfo Duarte
>Ribeirao Preto / SP / Brazil

Hi,
As I know, VFP couldn't accept this kind of assignment.
You can init. the array value with:
DIMENSION a1[2,3]
STORE '' TO a1

To assign a value in one element:
a1[1,1]='test'
a1[1,2]=10
a1[1,3]=.T.

Also, ALEN can return the size of an array.
e.g. in this case
ALEN(a1) return 6
ALEN(a1,1) return 2
ALEN(a1,2) return 3

Wilfred
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform