Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple Return Values
Message
From
07/12/2001 14:03:05
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00590869
Message ID:
00591353
Views:
39
Hi Ed.

>> Outbound parameter object passing:

Create an object of any kind you like. Save in a variable to keep it local to the method, or to a form property to scope it to the form.

In the Return of the method where you want to pass it back, say:

RETURN oMyParameterObject

That's it - nothing special about parameter objects <<

Thought you might like this one:

When Andy and I were working in VFP 5 (before AddProperty was introduced into the language), we created a special parameter object class just for returning arrays. It had a custom array property called aParameters and the only code was in the init of the parameter object:
LPARAMETERS taArray
ACOPY(taArray, This.aParameters)
Then, if we wanted to return an array, all we had to do was this:

RETURN CREATEOBJECT( 'xParameters', @laArray )

We like that minimalist style < g >.
Previous
Reply
Map
View

Click here to load this message in the networking platform