Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scope in VFP
Message
From
29/07/2006 23:22:36
 
 
To
28/07/2006 12:11:53
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
SAMBA Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01141152
Message ID:
01141582
Views:
33
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform