Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to assign an array to an array element.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00114049
Message ID:
00114096
Views:
21
>Does anyone have suggestions on how to assign an array to an element of another array?
>
>I want to do this:
>
>DIMENSION x[10], y[50]
>store 0 to y
>x[1]=y
>
>Of course the above does not work as I intended.
>
Costas,

As Craig said, VFP does not support arrays inside of arrays. But you can store the name of the second array to an element of the first array and macro expand that name when needed;

DIMENSION x[10], y[50]
store 0 to y
x[1]= "y"
? &x[1].[1]
* The previous line would display element 1 of the array Y.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform