Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Struggling with arrays
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00520246
Message ID:
00520249
Views:
14
>Hi,
>I try to store some numeric values in a array property and troubles with:
>
>1. Using a ParseToArray() function I need to send the array with reference. But I can't use @this.arr, but have to use a local variable @Arr. Is this the way it is?

Basically, you can't do this. First use ACOPY() to copy This.Arr to another array. Pass that array to the program using @, then copy it back to This.Arr.

>2. Defining the array-property in a form with arr[5] the value is .F. and can't be edited in the property window.

When the object initializes, you can set the default value for the entire array by This.Arr = 0. All elements will then be 0.

>So I ended up with code like
>
>ParseToArray('0;3;2;1;0,5',@Arr,';')år
>For i=1 to 5
> this.arr[i]=VAL(arr[i])
>Next
>
>Could I have done something easier like: this.arr={1,2,3,4,5} ?

No, you'll have to parse the string.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform