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

Click here to load this message in the networking platform