Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pass param by reference or private variable?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01671293
Message ID:
01671313
Vues:
62
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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform