Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to pass array to other form??
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00462914
Message ID:
00463046
Views:
15
>>Hi,
>> I have try to use @ before the array. However, it return syntax error.
>>
>>DO FORM myform WITH @myarray
>>
>>any thing wrong here?
>>
>>Thnak you
>

>Just tested this thing.
>
>You can pass the array by only giving the arrayname, so
>do form formname with arrayname
>
>in the init of your form you must set
>lparameter myarray(n)
>where n is the number of elemants in the array

Just some notes:

You don't need to define the number of elements in INIT()
If you pass the parameters with DO command they are always passed by reference.

If you call the function, the parameters by default are passed by value, but you can control the way parameters are passed with UDFPARMS() function.
Passing the array to a function is where we use the syntax:

something = myFunction(@myarray)

The objects are always passed by reference and that's why you can change
thisform.oCallingForm.Someproperty and be sure that Someproperty got a new value when you come back to the calling form.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform