Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to define a dynamic array
Message
De
08/06/2004 05:31:34
 
 
À
08/06/2004 04:31:19
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00911025
Message ID:
00911039
Vues:
20
Just declare your array initially as say laMyArray( 1, x) (where x is no. of fields in your table).
When you read the table you get the no. of records/rows via Reccount() (store in a var), then just
DIMENSION your array with this var.

e.g.

Select MyTable
lnNoRows = RECCOUNT()
DIMENSION laMyArray( lnNoRows, x)

But if you SQL Selectyour table into an array then it will be created, ready-dimensioned for you anyway.

Terry

>Hi,
>
>How to declare a dyhamic array because I don't known the size of this array
>before a single table load into it.
>
>
>Please advice
>
>Derek Yim
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform