Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passed Parameters vs PUBLIC memory variables.
Message
From
05/10/1997 15:51:23
 
 
To
05/10/1997 15:36:25
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00053333
Message ID:
00053334
Views:
21
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform