Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The FUNCTION Command - deficiencies
Message
 
To
19/05/2002 19:06:58
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Product Documentation
Miscellaneous
Thread ID:
00658635
Message ID:
00660107
Views:
16
>To my knowledge there is NO difference whatever between a PROCEDURE and a FUNCTION. A PROCEDURE can return a value and will return .T. in the absence ofa value, just ike a FUNCTION.
>However, there is an important difference depending on HOW either is invoked.
>Invoked through a DO, each PARAMETER is passed by reference unless enclosed in parentheses. So the command:
>DO FuncOrProc WITH A1, (B2), C3
>will have both A1 and C3 passed by reference and B2 passed by value.
>To get the same through a function 'call' would take:
>=FuncOrProc(@A1, B2, @C3)
>and I believe that a method call works the same way.
>
>As for method calls needing the parens or not, I'm not sure any more because I seem to occasionally get an error in VFP7 where I don't recollect similar in VFP6. So I now code parens on ALL my method calls, regardless.
>
>Finally, I didn't mean to say that there is a difference in the LOOKUP of a name depending on whether it is a PROC or FUNC. Can you clarify how you interpreted such?
>
>Cheers
I read this in an earlier post:
"When you issue DO with a function name, Visual FoxPro searches for the function in a specific order as follows:" ...
and took it to mean that their "are" threading issues specific to FUNC // PROC. I take it that you meant something else!
Terry
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform