Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to set array dimensions to (x,2)?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
How to set array dimensions to (x,2)?
Divers
Thread ID:
00317604
Message ID:
00317604
Vues:
65
I do the following:
DIMENSION myarray (7,2)
SELECT lookup
COPY TO ARRAY myarray FOR code = 4

That works to copy the portion of the table where the code field = 4 to the array, but what if I want to have a DIMENSION that is expandable? As in DIMENSION myarray (x,2), where x can vary in length?

I guess what I am asking is how to set the size of myarray if the size of the lookup table FOR code = 4 can change in length/number of records?

I do it now with a SCAN and counting the number of records for code = 4in the table, but there might be a better way. Huh?

My lookup table has like several lookup tables inside of it and that's why I have a code for each table, i.e. - The first lookup pseudo-table within my all-encompassing lookup table is code 1, the second is code 2, and on... But someone might add records to the code 1 table or the code 2 table and so on... So I need to dimension myarray to the adjusted table within a table length. Hope I didn't confuse anyone.

The structure of my all-encompassing lookup table is as follows:
Desc Char 40 && For example desc = Blue Eyes
ID Char 2 && For example ID = BL
Code Num 2 && For example Code = 1 for Eye Color in Lookup table

Thanks in advance.
Steve Kramer
Kramer & Kramer Design
"Home of Go Cartoons"
Web Site: www.stephenkramer.com
Would you believe Far Side Lite?
More than 270 original cartoons.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform