Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple Return Values
Message
De
07/12/2001 14:03:05
 
 
À
07/12/2001 12:06:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00590869
Message ID:
00591353
Vues:
41
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 >.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform