Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Global variable dies when sent as a parameter??
Message
 
To
25/01/1999 13:10:18
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00179903
Message ID:
00179911
Views:
32
>>[...] if I send a global variable as a parameter to a procedure, that global variable is dies.
>
>If it's a global var, why are you sending it as a parameter?
>Wouldn't the procedure have it available already?
>Also, is the parameter name the same as the global var? If so PARAMETERS makes it private, which may kill it; LPARAMETERS makes it local, which will kill it.

If you're doing it because you don't want the procedure to be able to change it's value (as I think you implied in your question), the solution is to give the parameter a different name within the procedure. (i.e. in the parameters statement, make it a different name than the global var's name.)

HTH,
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Previous
Reply
Map
View

Click here to load this message in the networking platform