Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Array - Adding lines
Message
From
13/11/2001 21:30:51
Wilfred Chan
Bnp Paribas Hong Kong Branch
Hong Kong, Hong Kong
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00581261
Message ID:
00581278
Views:
21
>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
Map
View

Click here to load this message in the networking platform