Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamically Sizing Arrays
Message
De
01/06/2001 16:40:00
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00513486
Message ID:
00514043
Vues:
15
>Keith,
>
>>>You're saying that a cursor would be more eficient than an
>array for 50 elements?
>
>No. But being able to reference (descriptively named) fields in a cursor can be easier to read than row/column references to an array. And because so much of VFP's table handling is buffered, there may not be much of a performance hit.
>
>I'm not espousing either approach (not denegrating either). Sometimes I'll use a cursor because an array would be substantially less legible. Just something to think about.
>
>BTW, regarding your original question, no, there's no significant performance hit involved in successively redimensioning an array, especially given your previous example.
>
>Covering all the bases, if there's a delimiter in the string you're going to parse, OCCURS() is a great way to predimension the array.
>

Unfortunately no, there's no reliable delimiter. I'm
actually parsing an ID3 tag and the frames vary in length
as well as identification (hence my simplistic example of
token parsing).

I agree that processing a cursor is pro'ly more legible,
but I'm really concerned about the overhead of populating
and processing the cursor.

Once I get the code working, i'll try using a cursor and see
if there is actually a difference.

Thanks!

...kt
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform