Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing array's by reference
Message
From
15/07/2003 19:25:11
 
 
To
15/07/2003 18:41:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00810463
Message ID:
00810473
Views:
16
>hello everybody.
>
>i have a method which fills an undefined number (based on pcount()) of arrays. i would like to pass the, to be filled, arrays by reference, like this:
>_SCREEN.GlobalStr.FillCodeList(;
>	@This.a_CodeList1, ;
>	@This.a_CodeList2, ;
>	@This.a_CodeList3, ;
>	@This.a_CodeList4, ;
>	@This.a_CodeList5, ;
>	@This.a_CodeList6, ;
>	@This.a_CodeList7, ;
>	@This.a_CodeList8)
>all arrays are pre-dimensioned and exist, however since they are attached to an object an error is create ("Alias 'THIS' is not found.").
>
>doing this with 'stand-alone' arrays it works fine. is there any way to pass 'object arrays' by reference?
>
>thanks for all your help in advance (Vfp6 Sp5)

Can't do it that way. Properties are always passed by value, you can't pass them by reference. What you can do is just pass an object reference as one of the parameters, and then pass the property names as additional parameters.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform