Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is PARAMETERS?
Message
From
23/08/2001 18:55:42
 
 
To
23/08/2001 18:25:03
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00548260
Message ID:
00548382
Views:
8
>>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"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform