Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scope in VFP
Message
De
29/07/2006 23:22:36
 
 
À
28/07/2006 12:11:53
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
SAMBA Server
Database:
Visual FoxPro
Divers
Thread ID:
01141152
Message ID:
01141582
Vues:
20
Hi Cetin:

Just wondering if your class example is similar to the kilofox example that i've added to my program for returning multiple values from a function using names parameters. It goes like this:

called program:
FUNCTION hg_variables ()
LOCAL oParam
**do some calculations and store values to rg1, rgc1, rg2, rgc2
oParam = CREATEOBJECT("line")
WITH oParam

	.addproperty("Right1", rg1)
	.addproperty("Right1cv", rgc1)
	.addproperty("Right2", rg2)
	.addproperty("Right2cv", rgc2)

endwith
RETURN oParam
calling program:
local oRetval, rg1, rg2, rgc1, rgc2
oRetval = hg_variables() 
rg1 = oRetval.right1
rgc1 = oRetval.right1cv
rg2 = oRetval.right2
rgc2 = oRetval.right2cv
then when i need to use the variables (rg1, rgc1, rg2, rgc2), i just pass them as a parameter in a function.

Is this similar to what you're describing? Is this cleaner (albeit more work) than using public variables? if so, i guess public variables is more lazy programming. :-)

thanks,

Paul
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform