Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can an array available in all procedures like a variable
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00363356
Message ID:
00363357
Vues:
18
An array _is_ a variable. You can declare it PUBLIC, PRIVATE, or LOCAL. A better method, though, would be to use a property of the form.

Michelle


>I create an array in my init procedure
>
>dimension a__gen10(1,2)
>
>as soon as I leave init procedure and go grids interactivechange() procedure to populate the grid the array definition disappears.
>Is there a way to make array through all the procedure for a form like a variable? I am trying to populate the array in grid by increasing array size and inserting values as follows
>
>*.grid.column1.text1.interactivechange()
>with thisform
>if .first_sw = .f.
> .first_sw = .t.
> .v = .v + 1
> a__gen10(.v,1) = .g1.c1.t1.value
> a__gen10(.v,2) = .g1.c6.t6.value
>else
> dimension a__gen10(alen(a__gen10, 1) + 1, alen(a__gen10, 2)) .v = .v + 1
> a__gen10(.v,1) = .g1.c1.t1.value
> a__gen10(.v,2) = .g1.c1.t1.value
>endif
>endwith
>
>Thanks
>Nick Patel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform