R
Roland Hall
in message
: Roland Hall wrote:
: > "Bob Barrows [MVP]" wrote in message
: > : >> Dave Anderson wrote:
: >>> Bob Barrows [MVP] wrote:
: >>>> " ... when you call it without using the Call statement"
: >>>>
: >>>> Better?
: >>>
: >>> Sure. My observation was not offered merely for nit picking.
: >>
: >> OK, I see that now. Sorry
: >>
: >>> I am
: >>> curious to know why Call is so overlooked in here. We use it as a
: >>> shop standard *because* it requires parentheses. Among other thins,
: >>> this has the effect of making Sub calls stand out visually.
: >>>
: <snip>
: >>> This conversation has piqued my interest in one thing: Does the
: >>> parentheses = byref rule apply when using Call?
: >>
: >> I don't know. There's nothing in Eric's blog to suggest that there's
: >> any difference, but I'm going to have to try it and see. Be right
: >> back ...
: >
: > I thought there was even though it was used as a function.
: >
: > 3) Call a function or subroutine: Limit = UBound(MyArray)
:
: I don't understand the point: this line is not utilizing the Call
statement
This line was presented in reference to this question:
Do you also require it for calls to builtin methods being called as subs?
: > 3.2) An argument list for a subroutine call (or a function call with
: > no assignment) that uses the Call keyword must be surrounded by
: > parens: Call MySub(MyArg)
:
: Right, but this is saying that the entire list of arguments must be
: surrounded by one set of parentheses.
:
: Call MySub(arg1, arg2,...argN)
:
: What Dave is asking is whether surrounding each individual argument with
: parentheses (in addition to the parens surrounding the entire argument):
:
: Call MySub((arg1), (arg2),...argN)
:
: would force the arguments to be passed byval, which my tests showed to be
: the case.
Well, then I misunderstood the question. I thought he was referring to
functions requiring parens when being called byref, not byval as they relate
to builtin methods.
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
: Roland Hall wrote:
: > "Bob Barrows [MVP]" wrote in message
: > : >> Dave Anderson wrote:
: >>> Bob Barrows [MVP] wrote:
: >>>> " ... when you call it without using the Call statement"
: >>>>
: >>>> Better?
: >>>
: >>> Sure. My observation was not offered merely for nit picking.
: >>
: >> OK, I see that now. Sorry
: >>
: >>> I am
: >>> curious to know why Call is so overlooked in here. We use it as a
: >>> shop standard *because* it requires parentheses. Among other thins,
: >>> this has the effect of making Sub calls stand out visually.
: >>>
: <snip>
: >>> This conversation has piqued my interest in one thing: Does the
: >>> parentheses = byref rule apply when using Call?
: >>
: >> I don't know. There's nothing in Eric's blog to suggest that there's
: >> any difference, but I'm going to have to try it and see. Be right
: >> back ...
: >
: > I thought there was even though it was used as a function.
: >
: > 3) Call a function or subroutine: Limit = UBound(MyArray)
:
: I don't understand the point: this line is not utilizing the Call
statement
This line was presented in reference to this question:
Do you also require it for calls to builtin methods being called as subs?
: > 3.2) An argument list for a subroutine call (or a function call with
: > no assignment) that uses the Call keyword must be surrounded by
: > parens: Call MySub(MyArg)
:
: Right, but this is saying that the entire list of arguments must be
: surrounded by one set of parentheses.
:
: Call MySub(arg1, arg2,...argN)
:
: What Dave is asking is whether surrounding each individual argument with
: parentheses (in addition to the parens surrounding the entire argument):
:
: Call MySub((arg1), (arg2),...argN)
:
: would force the arguments to be passed byval, which my tests showed to be
: the case.
Well, then I misunderstood the question. I thought he was referring to
functions requiring parens when being called byref, not byval as they relate
to builtin methods.
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp