General information
Category:
Coding, syntax & commands
>Hi,
>
>I'd like to create a new array called MyArray[2,3] and then, adding values like this:
>
>Declare MyArray[2,3]
>MyArray = "a", 2, .T., "b", "c", 3
>
>Is it possible? Any user function?
>
>[]'s
>
>Rodolfo Duarte
>Ribeirao Preto / SP / Brazil
Hi,
As I know, VFP couldn't accept this kind of assignment.
You can init. the array value with:
DIMENSION a1[2,3]
STORE '' TO a1
To assign a value in one element:
a1[1,1]='test'
a1[1,2]=10
a1[1,3]=.T.
Also, ALEN can return the size of an array.
e.g. in this case
ALEN(a1) return 6
ALEN(a1,1) return 2
ALEN(a1,2) return 3
Wilfred
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only