Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP60- Arrays and Classes
Message
From
21/01/2000 22:09:43
 
 
To
21/01/2000 16:27:04
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00321132
Message ID:
00321226
Views:
18
>How do I pass an array to a class?
>
>I am trying to do something like this:
>oMyObject = CREATEOBJECT('MyObject',TheArray)
>

Arrays must be passed by reference:

oMyObject = CREATEOBJECT('MyObject',@TheArray)

Pass-by-reference is subject to side-effects - if you change the content or size of the array when passed in, the changes will carry back to the calling routine. If you need to assign the content of the array to another variable or propery, you either need to copy each array member or use a function like ACOPY()
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform