Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamically Sizing Arrays
Message
De
31/05/2001 20:00:45
 
 
À
31/05/2001 18:11:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00513486
Message ID:
00513518
Vues:
12
>>>I have a situation where I need to add an unknown
>>>number of rows to an array. I think I have two
>>>options, 1) redimension the array for each new element
>>>that I need to add, or 2) concat everything to a string
>>>counting the elements as I go, then use something like
>>>WORDNUM() or ALINES() or some such, then redimensioning
>>>the array one time.
>>>
>>>My question is, efficiency wise, which would be the best
>>>solution?
>>>
>>>I'm running VFP 6, and I'm anticipating a maximum of
>>>maybe 50 rows.
>>>
>>>What say U?
>>
>>You could use a cursor instead of an array... they're pretty good at this sort of stuff.
>
>You're saying that a cursor would be more eficient than an
>array for 50 elements?

I don't know about efficient, but more convenient for adding rows etc.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform