Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Array : Dimension vs Ains
Message
From
01/02/2000 00:28:18
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00325376
Message ID:
00325447
Views:
20
>>To add another row to a two column array, is it more proper to redimension or use ains? Under what circumstance would you want to use ains() and what dangers are there in using it to add rows given that it does not change its size?
>>
>
>AINS() does not redimension the array; it pushes the last row off the edge of the world into an abyss. Read the remarks at the end of the VFP Help on AINS()
>
>DIMENSION would be used to resize the array, and then AINS() to shove things in at the middle.

AINS() will move things down (if the array is re-dimensioned first) ONLY if the array is single dimensioned. If it multi-dimensioned, it "loses" the data when you try to insert a column.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform