Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is PARAMETERS?
Message
From
23/08/2001 20:47:43
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00548260
Message ID:
00548408
Views:
8
Sergey and Jim-

>>...and, to round it all out, there are the parameters indicated within parentheses after the name on a FUNCTION statement. These are implicitly LOCAL too,although I couldn't find this documented in the (VFP7) Help for "FUNCTION Command".

The help for FUNCTION shows the alternate form (using parens). So not sure what Jim meant by that. But, hacker's covers this.

>3. How would you call function usually? m.somevariable = Somefunction()? You would think so but help only says "When you issue DO with a function name, Visual FoxPro searches for the function in a specific order as follows: ...".

There is, so far as I can tell, no difference between PROCEDURE and FUNCTION except convention. Try this:

MESSAGEBOX( hello("Jim's Circus" ) )
PROCEDURE hello(t1)
RETURN t1

It is by convention that we use FUNCTION for routines that return values.

>4. The example instead of showing a simple function with parameters for some reason uses a custom object class.

That has a FUNCTION member. Same difference. Weird choice,though, I'll grant you.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform