Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is PARAMETERS?
Message
De
23/08/2001 18:25:03
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
 
À
23/08/2001 15:43:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00548260
Message ID:
00548373
Vues:
7
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform