Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passed Parameters vs PUBLIC memory variables.
Message
De
05/10/1997 15:51:23
 
 
À
05/10/1997 15:36:25
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00053333
Message ID:
00053334
Vues:
26
>Here's a stupid question... What are the pros and cons of passing parameters to
>procedures and functions as opposed to making the memory variables PUBLIC and
>using them in procedures and functions without passing them as parameters?

I have a few public variables in my applications. The need to have them public is that they are used from several areas in the application.

You may also add some properties in the application object in order to avoid public variables.

As for parameters, I always try to use only one and that is an object or more than one but only objects. By passing an object, you can refer to that object properties which mean you don't need to pass parameters anymore.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform