Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is PARAMETERS?
Message
De
23/08/2001 18:55:42
 
 
À
23/08/2001 18:25:03
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00548260
Message ID:
00548382
Vues:
12
>>What is difference betwen variables (LOCAL, PRIVATE, PUBLIC) and PARAMETERS?
>
>Parameters are variables or values that are passed to a procedure, function, or method.
>
>Local, private, and public are keywords that refer to variables. LOCAL and PUBLIC create variable references with initial values of .F. PRIVATE hides a variable reference that may, or may not, be in the calling program. Try the following:
>
CLEAR
>PRIVATE BAR
>BAR = "Goodbye, Cruel World!"
>?BAR
>=helpme(bar)
>?BAR
>
>FUNCTION helpme(t_bar)
>  PRIVATE BAR
>  LOCAL foo
>  PUBLIC foobar
>  BAR = "Hello, "
>  t_bar = "World!"
>  ?BAR
>  ??t_bar
>ENDFUNC
I was sure you were going to change it to "I'm off to join the circus"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform