Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AINS() doesn't work?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00967750
Message ID:
00967759
Vues:
18
>Hi, All,
>I want to insert a new column to a existing 2-dimensional array. I used the foxpro function aIns() to do this:
>
>DIME aMyarray[2,10]
>aMyarray = "ABC"
>=aIns(aMyarray,10,2)
>
>The result is that the aMyarray[2,10] becomes the new value .F. instead of inserting a new column into this array.
>
>Any idea?
>Thanks

Hi Patrick,

It works correctly

If you read the fine print in Help:

Remarks

Inserting an element, row, or column into an array does not change the size of the array. The trailing elements, rows, or columns are shifted toward the end of the array and the last element, row, or column in the array is dropped from it. The newly inserted element, row, or column is initialized to false (.F.).

you should noticethat inserting the row does not change the total size of array.
Fill the array with values like "ABC1...ABC10") and you will see how it shifts.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform