Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning an Array from a Function
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00338850
Message ID:
00338998
Views:
22
>>>>Then, how i Return an Array from a function?
>>>Francisko,
>>>
>>>You don't return an array from a function. You pass the array by reference and then let the called function change the passed array.
>>
>>Or create a parameter object containing the array to return as a member array, and return the object reference.
>
>Ed,
>
>If the caller create4s the parameter object then the caled routine does not need to return it. It will be there just as it was created containing any changes made in the called routine.

Absolutely! I'm finding that I'm using parameter objects with much greater frequency, both as an inbound data object, and for outbound purposes. There are huge advantages IMO - a simpler, cleaner interface for method calls (no more methods requiring a zillion parameters!) and the option of returning complex structures from a function or method...it's nice having an easy way of returning something consistant that may contain detailed error information if somethingwent wrong, or the result if it worked.
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
Next
Reply
Map
View

Click here to load this message in the networking platform