Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Call a procedure like a method syntax
Message
 
 
To
21/04/2009 21:59:18
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01395833
Message ID:
01395858
Views:
79
Yes and yes

>Thanks to both of you for the blogs (Craig's is at http://www.craigberntson.com/blog/2009/04/functions-and-procedures-in-vfp-101.asp)
>
>A few follow-ups to be sure I am solid on this...
>
>1. (True or False?)
>If I understand correctly, I could indeed do a complete search-and-replace in my .prg procedure files and rename all FUNCTION statements to PROCEDURE, and/or vice-versa, and my code that calls these will still work *EXACTLY* the same? Since the calling code (call as a function vs. call as a procedure) is what determines whether the params are getting passed by-value or by-ref.
>
>2. (True or False?)
>A Procedure definition can indeed have a Return statement in it, but whether a value is actually returned or not is determined on how the Proc is called. Call it as a Func to get the return value, or call as a Proc syntax, and you will no get the return value.
>
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform