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

Click here to load this message in the networking platform