Login | |
|
 |
RE: Subs and Functions - 12/14/2006 9:31:11 AM
|
|
 |
|
| |
ebgreen
Posts: 5246
Score: 31
Joined: 7/12/2005
Status: online
|
I think I wasn't clear. I never maintained that there is anything wrong with using Call. I never do and I think it is confusing to use it but if you want to then knock yourself out. There is really just two things to remember if you avoid Call: 1) If the procedure returns a value, put () around the parameters. 2) If the procedure does not return a value, don't put () around parameters.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: Subs and Functions - 12/18/2006 7:46:00 AM
|
|
 |
|
| |
mcds99
Posts: 441
Score: 4
Joined: 2/28/2006
Status: offline
|
I was a COBOL programmer (please forgive me :-O) I was taught that "goto" was bad, but as we know... "goto" works so it got used and abused, stay with me on this... I figured out that a "goto" is best used by returning to the sending code unless the "goto" was an end point. If I need to do something and that something is an end point I would use a "Sub" (closeing files and exiting). If I need to do something and I need to return to do something else I would use a "Function" (reading, writing, etc...). That's how I make the Sub vs. Function decision any way.
_____________________________
Sam Keep it Simple Make it Fun KiSMiF
|
|
| |
|
|
|
|
|