Mike Brind wrote on 11 aug 2006 in
microsoft.public.inetserver.asp.general:
I _always_ assume vbscript. Users of jscript/javascript or perl tend
to announce themselves (in a tone of voice that varies between proud,
or aggressively defensive ).
[skipping a lot of following and diverging thread lines resulting from
here]
You can see the OP asked a Q that can be answered
with a vbscript answer or an jscript answer,
if the word "function" can be extended to "method",
which is a function in the broader sence too.
My one row addition, which is only a rebuke in the most suspicious of
minds, and I know Mike's mind is not, is just that _I_ would have
answered:
"Ubound() in vbscript"
I cannot agree with Mike it is a good thing to assume vbs in an anwer
where vbs is not stipulated in the question in his ASP NG.
The "asp = vbscript" concept does not aggree with me.
=============
I would have added that the number of terms
of a jscript array is not as easily defined:
var a = new Array();
a[0] = 5;
a[999] = 'Hi';
a['saved'] = 4;
is the last one part of the array, and the number of terms 3?
or is the number 1001?
Let us try a.length:
var a = new Array();
a[0] = 5;
a[999] = 'Hi';
response.write(a.length+'<br>') // writes 1000
a['saved'] = 4;
response.write(a.length) // writes 1000 again
I think length does not return the actual number of terms,
so a count is necessary:
var a = new Array();
a[0] = 5;
a[999] = 'Hi';
a['saved'] = 4;
var n = 0;
for (t in a)n++;
response.write(n); // 3
That is the right jscript answer, methinks,
depending on definition of "array" and "terms".