Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass param by reference or private variable?
Message
 
 
To
02/10/2019 00:16:22
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01671293
Message ID:
01671313
Views:
61
I don't like this idea. you are recreating passing parameters by position using an object with all the drawbacks of it.

>Because this is a really common functionality, I created a class with 10 standard properties (Value1 - Value10) and a property for Success. I use it everywhere:
>LOCAL loInfo AS Info OF Utils.vcx
>loInfo = NEWOBJECT("Info", "Utils.vcx")
>loInfo.Value1 = 123
>loInfo.Value2 = "Test"
>
>THIS.CalculateEtc(m.loInfo)
>
>IF loInfo.Success
>    Messagebox(loInfo.Value2)
>ENDIF
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform