Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding a column to an array
Message
De
30/12/2003 11:39:54
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
30/12/2003 11:33:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00862826
Message ID:
00862865
Vues:
11
So, AINS() will not make the array bigger, and changing the DIMENSION will "mix" the two-dimensional array, right? What a hassle.

>Hi Hilmar,
>
>because AINS() and ADEL() not change array dimension,
>for row or columns operations, AINS() and ADEL() not change the array dimension, too.
>
>This operation move item only ( bottom rows or right columns ).
>
>Then, the best solution for insert rows or columns is a ACOPY() on a new array, O(N²) complex.

Yes, I think that solution was suggested somewhere in the thread. Another option is to make the array large enough in the first place, so no redimensioning is required. But you can't always foresee how many elements you need. Then, for speed, you might add several columns at a time (with ACOPY()).
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform