I called about half of the () in my postings related to this topic "parameter
list parentheses", because
(a) they are used in VBScript to this aim for functions
(a) they must be carefully differentiated from "please pass this argument
by value" () that may be used for parameters of Subs
or Functions
Perhaps I should have bolded ebgreen's
2)
If the procedure does not return a value, don't put () around parameters or paraphrased it like:
3) The parameter list of a Sub call
isn't delimited by (); if you see a () after
the name of a Sub it's either the second type or a syntax error
In some languages you can't call anything without (); if you have no parameters to
pass or don't want to tell just now you have to put () around the empty list; sometimes
you must put a void or an ellipsis between the () to help the compiler along. Still
other languages don't use parameter list () at all (Tcl, shells); as to the Perl you
mentioned: D. Conway's best practice for parantheses is to avoid them for builtins and
'honorary' builtins.
That's why I wouldn't strive to "find a technique where I can allways enclose the passed
parms in (), whether it is a sub or a func". I would accept the hard (?) fact of life
that Subs aren't Functions and that in VBScript the second need "parameter list parentheses"
and the first don't. Then you can forget about Call (as a further means of muddle the difference)
and keep your mind alert for those cases where special (fancy?) parameter passing forces you
to think about "protect this param" ().
After reading this again, I think I must add: All the above concerns the
calling of NamedCodeBlocks.
If you want my simple rule for the defining of any NamedCodeBlocks whatsoever - Subs, Functions,
with no arguments, with 42 parameters, ....
Put parameter list () after the name in any case
I never had problems with this, but YMMV.