Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Dimension to resize an array
Message
De
11/01/2006 08:55:48
Mike Yearwood
Toronto, Ontario, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01085313
Message ID:
01085588
Vues:
17
Hi Dmitry

What are you using an array for? A cursor often can be used instead.

>Hilmar,
>I actually am using your approach 2 (even though you marked it with "yech" <g>.)
>This is probably one thing that I miss from Clipper (which is how I thought arrays should work) as compared to VFP arrays.
>
>Thank you for your input.
>
>
>>
>>As explained in other replies you got, the array is, unfortunately, treated as a one-dimensional structure; the two dimensions are just a convenient way to access it. But in the case of redimensioning, you are in trouble.
>>
>>Some options:
>>
>>
  • Give the array sufficient columns in the first place.
    >>
  • To redimension, copy to another array (yech!).
    >>
  • Use my "large array" class from the download section, instead of normal arrays. Accessing the array elements is slower than with built-in arrays, but redimensioning is no problem. Also, you can have more than 2 dimensions in your array.
  • Précédent
    Suivant
    Répondre
    Fil
    Voir

    Click here to load this message in the networking platform