Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Global variable dies when sent as a parameter??
Message
 
À
25/01/1999 13:10:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00179903
Message ID:
00179911
Vues:
34
>>[...] 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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform