Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AINS() doesn't work?
Message
From
08/12/2004 10:54:49
 
 
To
08/12/2004 10:34:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00967750
Message ID:
00967761
Views:
8
From the help file:
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.).

What you should do is to make sure that the array is large enough before AINS:
DIMENSION aMyarray [2, 11]
aMyarray = "ABC"
AINS (aMyarray, 10, 2)
HTH

>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform