Dave Anderson wrote on 13 jan 2005 in
microsoft.public.inetserver.asp.general:
Sure. My observation was not offered merely for nit picking. 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.
Because of the sloppyness of M$ the difference
between a statement and a function call is blurred.
Every row in VBscript and earlier Basics is a statement.
There are two "default statements"
====================
1 the LET statement:
LET a = 1
[This should be different from the conditional
a = 1, which returns a boolean true/false,
and is used in Jscript as ==]
Nowadays [VBscript] only
a = 1 is used, a tutorial mistake.
====================
2 the statementized function
A function should be in an expression
a = 3 + myFunction
but if a function's return value is not used or not specified,
the function can or must be used as a statement or as a called [CALL]
funcion
======================
Statements never have parentheses around their parameters.
Functions always have, unless they are statementized.
======================
So the statmentized function:
myFunction "param1", "param2"
goes without parentheses,
but adding parameters around seperate expressions
is legal but silly, like:
myFunction ("param1"), ("param2")
That is why
Response.write ("Hello world")
Is also silly, useless, costs some extra processing
and is to be avoided for tutorial reasons,
because the error of
myFunction ("param1", "param2")
would not be avoided or understood.
========================
Using
Call myFunction ("param1", "param2")
is legal, but only for real functions
and not for statements.
Conclusion:
Never use:
Response.write ("Hello world")
or [also legal, but just as silly]:
Response.write (("Hello world"))
but always
Response.write "Hello world"