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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only