473,509 Members | 2,918 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

array question

Is there a way or a property that can tell me how many items are in an
array? Like when using the Split function but the actual number of
created array items is unknown? I need to be able to dynamically count
the number of items that are created as a result of using Split().

Hopefully this is enough information...

Thanks!

Aug 10 '06 #1
27 3248

the other john wrote:
Is there a way or a property that can tell me how many items are in an
array? Like when using the Split function but the actual number of
created array items is unknown? I need to be able to dynamically count
the number of items that are created as a result of using Split().
Ubound()

--
Mike Brind

Aug 10 '06 #2
oh geeze....duhh. time to go home, ugh! I'm fried.

Thanks!!
Mike Brind wrote:
the other john wrote:
Is there a way or a property that can tell me how many items are in an
array? Like when using the Split function but the actual number of
created array items is unknown? I need to be able to dynamically count
the number of items that are created as a result of using Split().

Ubound()

--
Mike Brind
Aug 10 '06 #3
Mike Brind wrote on 10 aug 2006 in microsoft.public.inetserver.asp.general:
the other john wrote:
>Is there a way or a property that can tell me how many items are in an
array? Like when using the Split function but the actual number of
created array items is unknown? I need to be able to dynamically count
the number of items that are created as a result of using Split().

Ubound()
Only if vbs is assumed, not in jscript.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 10 '06 #4

Evertjan. wrote:
Mike Brind wrote on 10 aug 2006 in microsoft.public.inetserver.asp.general:
the other john wrote:
Is there a way or a property that can tell me how many items are in an
array? Like when using the Split function but the actual number of
created array items is unknown? I need to be able to dynamically count
the number of items that are created as a result of using Split().
Ubound()

Only if vbs is assumed, not in jscript.
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 ).

:-)

--
Mike Brind

Aug 10 '06 #5
Evertjan. wrote:
>>Like when using the Split function but the actual number
^^^^^^^^^^^^^^
>
Only if vbs is assumed, not in jscript.
In principle, I agree that VBScript questions posing as ASP questions
deserve the "ASP is not VBScript" rebuke, but have tried to say so
indirectly, by answering the questions with dual-language examples.

I think this serves several purposes, not least of which is demonstrating
the beauty and simplicity of doing some things in JScript, and none of which
is to express -- ahem -- pride or defensiveness.

In any case, VBScript is implied by the term "Split function", don't you
think? JScript has very few functions, and String.split() is not one of
them.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Aug 10 '06 #6

"Dave Anderson" <NY**********@spammotel.comwrote in message
news:12*************@corp.supernews.com...
Evertjan. wrote:
>Like when using the Split function but the actual number
^^^^^^^^^^^^^^

Only if vbs is assumed, not in jscript.

In principle, I agree that VBScript questions posing as ASP questions
deserve the "ASP is not VBScript" rebuke, but have tried to say so
indirectly, by answering the questions with dual-language examples.
The problem with us programmers is that we tend to loose the human point of
view.
If you are working on an ASP page and have a problem with syntax the human
thing to do is ask other developers in your community. In this case the
community is this NG.

For that reason I don't think the "ASP is not VBScript" rebuke is ever
justified. We need to remember that a lot of people developing with ASP
aren't hardened 'classically' trained programmers.

If you were to look at the posts in VBScript and Javascript groups without
knowing the names of the groups you might concluded the VBScript = Automated
Administration and Javascript = DHTML. It's hardly fair then to complain
when someone posts a VBScript question in the ASP group.
I think this serves several purposes, not least of which is demonstrating
the beauty and simplicity of doing some things in JScript, and none of
which
is to express -- ahem -- pride or defensiveness.
I agree. JScript/Javascript/ECMAScript (seen rebukes about use of these
terms as well) is simply a more elegant and ultimately a more powerfull
language. However the vast majority of the ASP community uses VBScript. It
would've been better if it had standardised on JScript but it didn't.
Frankly most ASP pages don't need the flexibility that JScript offers and
VBScript is more friendly to the 'casual' programmer.
>
In any case, VBScript is implied by the term "Split function", don't you
think? JScript has very few functions, and String.split() is not one of
them.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.
Use
of this email address implies consent to these terms.


Aug 11 '06 #7
Dave Anderson wrote on 11 aug 2006 in
microsoft.public.inetserver.asp.general:
In any case, VBScript is implied by the term "Split function", don't you
think? JScript has very few functions, and String.split() is not one of
them.
stringObj.split([separator[, limit]])

It is called a "method", because of the added flexibilty.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 11 '06 #8
Anthony Jones wrote on 11 aug 2006 in
microsoft.public.inetserver.asp.general:
Frankly most ASP pages don't need the flexibility that JScript offers and
VBScript is more friendly to the 'casual' programmer.
Even under asp/vbs, I like to define my regex functions in jscript,
and the possibiliy to get UTC from the server, without having to regard
summertime change dates is very useful when using servers on the other side
of the big pond.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 11 '06 #9

"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
Anthony Jones wrote on 11 aug 2006 in
microsoft.public.inetserver.asp.general:
Frankly most ASP pages don't need the flexibility that JScript offers
and
VBScript is more friendly to the 'casual' programmer.

Even under asp/vbs, I like to define my regex functions in jscript,
That's interesting. It's one of the only areas where I find VBScript
better.
VBScript can execute a global expression with submatches whereas JScript
can't (actually it can but you can't retrieve the submatches)
and the possibiliy to get UTC from the server, without having to regard
summertime change dates is very useful when using servers on the other
side
of the big pond.
Good point there's no way to do this in VBScript without help from an
external component.
>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Aug 11 '06 #10
Anthony Jones wrote:
If you are working on an ASP page and have a problem with
syntax the human thing to do is ask other developers in
your community. In this case the community is this NG.
I do not agree. If you have a problem with syntax, then you are likely to be
posting here for the first time (or thereabout). This forum was not already
"your community" because you would have been reading it for some time, and
would know the difference between microsoft.public.scripting.vbscript and
microsoft.public.inetserver.asp.general. If it were "your community", you
would have an interest in keeping it tidy.
For that reason I don't think the "ASP is not VBScript" rebuke
is ever justified. We need to remember that a lot of people
developing with ASP aren't hardened 'classically' trained
programmers.
By that reasoning, none of these are justified:

JavaScript is not Java
ASP.NET is not ASP
Client-side is not server-side
(D)HTML is not ASP

My point, if you read it carefully, is that the rebuke need not be rude, and
ought to be instructive. There *is* value in asking people to use
appropriate groups. The last thng we need is a bunch of posts about the
conflict Lebanon.
If you were to look at the posts in VBScript and Javascript
groups without knowing the names of the groups you might
concluded the VBScript = Automated Administration and
Javascript = DHTML. It's hardly fair then to complain when
someone posts a VBScript question in the ASP group.
Who complained? I advocated instructive examples that make the point.
JScript/Javascript/ECMAScript (seen rebukes about use of
these terms as well) is simply a more elegant and ultimately
a more powerfull language.
I can't agree that JScript is more powerful than VBScript. I cannot think of
a single task that JScript can solve, but that VBScript cannot. I don't
consider it *convenient* to use the Class Statement (or 4*atn(1) in place of
Math.PI), but I don't deny that there are routes to solutions in VBScript.

And let's face it, VBScript often runs faster than JScript on the server.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Aug 11 '06 #11
Evertjan. wrote:
>In any case, VBScript is implied by the term "Split function",
don't you think?

It is called a "method", because of the added flexibilty.
It is called a method because it belongs to an object, and is not a
standalone function. I don't see how that translates to added flexibility.

The point was that the OP used "function", not "method".

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Aug 11 '06 #12
Yikes. what happened here? didn't count on all of this...

so the moral of the story is you don't want me posting VB questions in
here? Ok then. I can live with that.

In way it's too bad however. This group has been invaluable to me and
with so many knowledgable people that are doing similar things its a
great place to get a quick answer, if even "slightly" off topic. I
understand everyone wants to keep the group relevant to ASP. Still,
it's nice to stop at coffee house for more than just coffee
occasionally ;-)

Thanks all anyway!
Dave Anderson wrote:
Evertjan. wrote:
In any case, VBScript is implied by the term "Split function",
don't you think?
It is called a "method", because of the added flexibilty.

It is called a method because it belongs to an object, and is not a
standalone function. I don't see how that translates to added flexibility.

The point was that the OP used "function", not "method".

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Aug 11 '06 #13

Dave Anderson wrote:
Anthony Jones wrote:
If you are working on an ASP page and have a problem with
syntax the human thing to do is ask other developers in
your community. In this case the community is this NG.

I do not agree. If you have a problem with syntax, then you are likely to be
posting here for the first time (or thereabout). This forum was not already
"your community" because you would have been reading it for some time, and
would know the difference between microsoft.public.scripting.vbscript and
microsoft.public.inetserver.asp.general. If it were "your community", you
would have an interest in keeping it tidy.
Interesting....

If you took out all the server-side scripting questions from this
group, and all the db-related ones (which obviously belong in other
groups), not to mention all the IIS related questions, this group would
be an ex-group. It would cease to be. It will have shuffled off this
mortal coil. It would be dead.

By definition, then, this group's only purpose is as a first staging
post for newbies, until they're better informed.

btw, my very tongue in cheek comment on the users of
jscript/javascript/perl etc was never intended to flame...

--
Mike Brind

Aug 11 '06 #14
the other john wrote:
Yikes. what happened here? didn't count on all of this...

so the moral of the story is you don't want me posting VB questions in
here?
Wow!
Who said anything like that?
Ok then. I can live with that.
Don't. This is the perfect group to post ASP questions that involve
server-side vbscript code.
In way it's too bad however. This group has been invaluable to me and
with so many knowledgable people that are doing similar things its a
great place to get a quick answer, if even "slightly" off topic. I
understand everyone wants to keep the group relevant to ASP. Still,
it's nice to stop at coffee house for more than just coffee
occasionally ;-)
You seem to have missed the point. The argument was not about whether your
post was on-topic. It was more about whether it was correct to assume you
were using vbscript as opposed to jscript in your server-side code.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Aug 11 '06 #15
Anthony Jones wrote:
For that reason I don't think the "ASP is not VBScript" rebuke is ever
justified. We need to remember that a lot of people developing with
ASP aren't hardened 'classically' trained programmers.
We're here to educate aren't we (Well ... I am. I try very hard not to just
give the quick fix)? People who talk about writing ASP code need to be
informed that their terminology is incorrect. I really do not consider that
to be a rebuke.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Aug 11 '06 #16
Dave Anderson wrote:
Evertjan. wrote:
>>>Like when using the Split function but the actual number
^^^^^^^^^^^^^^
>>
Only if vbs is assumed, not in jscript.

In principle, I agree that VBScript questions posing as ASP questions
deserve the "ASP is not VBScript" rebuke,
Wait a minute, you seem to be implying that vbscript or jscript syntax
questions are not really on-topic here. Am I reading too much into this
statement?
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Aug 11 '06 #17
Mike Brind wrote:
Dave Anderson wrote:
>Anthony Jones wrote:
>>If you are working on an ASP page and have a problem with
syntax the human thing to do is ask other developers in
your community. In this case the community is this NG.

I do not agree. If you have a problem with syntax, then you are
likely to be posting here for the first time (or thereabout). This
forum was not already "your community" because you would have been
reading it for some time, and would know the difference between
microsoft.public.scripting.vbscript and
microsoft.public.inetserver.asp.general. If it were "your
community", you would have an interest in keeping it tidy.

Interesting....

If you took out all the server-side scripting questions from this
group, and all the db-related ones (which obviously belong in other
groups), not to mention all the IIS related questions, this group
would
be an ex-group. It would cease to be. It will have shuffled off this
mortal coil. It would be dead.
Why would anyone want to to that? Who said we should be doing that?
Everything you've mentioned is on-topic (well ... maybe not db, but even
those)...

Let me go back and read this thread. I though the discussion was about
whether or not it was correct to assume a poster was asking a vbscript
question as opposed to jscript ....

OK, I think I see what you are talking about in Dave's post. I will reply to
that.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Aug 11 '06 #18
Bob Barrows [MVP] wrote:
the other john wrote:
>Yikes. what happened here? didn't count on all of this...

so the moral of the story is you don't want me posting VB questions
in here?
Actually, since VB is not used in ASP (except as an external component) we
really would rather not address VB questions here. VBScript questions, when
they involve server-side code, are certainly welcome.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Aug 11 '06 #19

"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcomwrote in message
news:eH****************@TK2MSFTNGP06.phx.gbl...
Anthony Jones wrote:
For that reason I don't think the "ASP is not VBScript" rebuke is ever
justified. We need to remember that a lot of people developing with
ASP aren't hardened 'classically' trained programmers.

We're here to educate aren't we (Well ... I am. I try very hard not to
just
give the quick fix)? People who talk about writing ASP code need to be
informed that their terminology is incorrect. I really do not consider
that
to be a rebuke.
Your point is well made. I retract. I guess I'm easily irked by the
pendantic amongst us and that can cloud my judgement. I still think it as
you do that the OP was reasonably placed here.
>
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


Aug 11 '06 #20
Mike Brind wrote on 11 aug 2006 in
microsoft.public.inetserver.asp.general:
>
Evertjan. wrote:
>Mike Brind wrote on 10 aug 2006 in
microsoft.public.inetserver.asp.general:
the other john wrote:
Is there a way or a property that can tell me how many items are
in an array? Like when using the Split function but the actual
number of created array items is unknown? I need to be able to
dynamically count the number of items that are created as a result
of using Split().
Ubound()

Only if vbs is assumed, not in jscript.

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".

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 11 '06 #21

"Dave Anderson" <NY**********@spammotel.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Anthony Jones wrote:
If you are working on an ASP page and have a problem with
syntax the human thing to do is ask other developers in
your community. In this case the community is this NG.

I do not agree. If you have a problem with syntax, then you are likely to
be
posting here for the first time (or thereabout). This forum was not
already
"your community" because you would have been reading it for some time, and
would know the difference between microsoft.public.scripting.vbscript and
microsoft.public.inetserver.asp.general. If it were "your community", you
would have an interest in keeping it tidy.
Nah, I like the idea of people who doing similar things talking to each
other in same place about the various things they have to do. You're right
of course it would keep things tidy.
>
For that reason I don't think the "ASP is not VBScript" rebuke
is ever justified. We need to remember that a lot of people
developing with ASP aren't hardened 'classically' trained
programmers.

By that reasoning, none of these are justified:

JavaScript is not Java
ASP.NET is not ASP
Client-side is not server-side
(D)HTML is not ASP
Yep right again.
>

My point, if you read it carefully, is that the rebuke need not be rude,
and
ought to be instructive. There *is* value in asking people to use
appropriate groups.
Within reason but a purely VBScript question is IMO appropriately asked
here. Whether it's right or wrong and whether you like it or not the NGs
_have_ become communities of people doing similar things. The original
technical sectioning of the NGs has been usurped by the what those technical
things are generally used for.
>The last thng we need is a bunch of posts about the
conflict Lebanon.
If you were to look at the posts in VBScript and Javascript
groups without knowing the names of the groups you might
concluded the VBScript = Automated Administration and
Javascript = DHTML. It's hardly fair then to complain when
someone posts a VBScript question in the ASP group.

Who complained? I advocated instructive examples that make the point.
Ok compliant was too strong a word. I don't even think it makes sense to
try to encourage someone to use what is technically the correct group if the
question is reasonable relevant to the community. An ASPer can take a one
look at the set of subjects in VBscript and reasonable conclude they are in
the wrong place.
>
JScript/Javascript/ECMAScript (seen rebukes about use of
these terms as well) is simply a more elegant and ultimately
a more powerfull language.

I can't agree that JScript is more powerful than VBScript. I cannot think
of
a single task that JScript can solve, but that VBScript cannot.
Well that statement is true for pretty much anything that can assign
variables and branch. It's a matter of how quickly you can build the code
and how understandable it is when you've built it.
>I don't
consider it *convenient* to use the Class Statement (or 4*atn(1) in place
of
Math.PI), but I don't deny that there are routes to solutions in VBScript.

And let's face it, VBScript often runs faster than JScript on the server.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.
Use
of this email address implies consent to these terms.


Aug 11 '06 #22
Evertjan. wrote:
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:
ECMA-262v3, 15.4.5.2 length
The length property of this Array object is always
numerically greater than the name of every property
whose name is an array index.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Aug 11 '06 #23
Dave Anderson wrote on 11 aug 2006 in
microsoft.public.inetserver.asp.general:
Evertjan. wrote:
>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:

ECMA-262v3, 15.4.5.2 length
The length property of this Array object is always
numerically greater than the name of every property
whose name is an array index.
Sorry, I do not understand this ECMA sentence.

A property is a value? Or has a value?

How can something be greater than the name?
[Meaning no insult to the Jewish faith]

Wat would be the name of the length property? "length"?

Is a name not an array index if it is enumerated?

What where thos ECMA boys and girls doing
the day they concocted this ruling?

Anyway, I thought we were talking JScript? ;-)

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 11 '06 #24
Bob Barrows [MVP] wrote:
Wait a minute, you seem to be implying that vbscript or
jscript syntax questions are not really on-topic here.
Am I reading too much into this statement?
I think so. I don't personally mind that questions are off-topic when they
are clearly *related* to ASP. I think it is often reasonable to ask ADO,
CDO, SQL, VBScript, JScript, DOM and HTML questions here. You can observe
for yourself that I answer questions on a broad range of topics.

I intended to say that posters should be made aware when their questions are
unnecessarily vague[1]. It is in their interests to narrow their questions,
after all.

Your observation to Anthony echoes my belief. People SHOULD be taught to use
correct terminology. Some of us are just less personable in our writing
style.


[1] "Rebuke" was a poor word choice -- a bit harsher to read than I
intended. It is no help that communicating in plain text adds to the
perception of pointless pedantry on my part.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Aug 11 '06 #25
Evertjan. wrote:
> ECMA-262v3, 15.4.5.2 length
The length property of this Array object is always
numerically greater than the name of every property
whose name is an array index.

Sorry, I do not understand this ECMA sentence.
It means that when you enumerate the properties of an array object, some of
them are nonnegative integers, which are treated by the array as index
values:

a[0] = 5;
a[999] = 'Hi';
a['saved'] = 4;
for (var x in a) output(x) // "0", "999", "saved"
for (x in a) output(typeof x) // "string", "string", "string"

In this example, there is a property named "0", another named "999" and a
third named "saved". Two coerce to nonnegative integers, so they are treated
like index values.
Wat would be the name of the length property? "length"?
I assume so.
Is a name not an array index if it is enumerated?
I'm not sure what you mean here. Hopefully, my above answer clears it up.
Anyway, I thought we were talking JScript? ;-)
Forget I said anything.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Aug 11 '06 #26

Evertjan. wrote:
Mike Brind wrote on 11 aug 2006 in
microsoft.public.inetserver.asp.general:

Evertjan. wrote:
Mike Brind wrote on 10 aug 2006 in
microsoft.public.inetserver.asp.general:

the other john wrote:
Is there a way or a property that can tell me how many items are
in an array? Like when using the Split function but the actual
number of created array items is unknown? I need to be able to
dynamically count the number of items that are created as a result
of using Split().


Ubound()


Only if vbs is assumed, not in jscript.
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:
You're right. I didn't see it as a rebuke. I'm well used to your
style now.
>
"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.
To be fair, there were a number of clues in this case that the OP uses
vbs, not the least of which is that his previous questions have
stipulated vbs. And as Dave Anderson pointed out, vbs was implied in
the question. Nevertheless, it isn't going to cause me any problems to
add the bit of clarification you suggest in future.
The "asp = vbscript" concept does not aggree with me.
I go back to what I said earlier. The vast majority of questioners
here use vbscript, and it is the default language. The small number of
jscript/perlscript users do tend to clarify the language they are
using. I have yet to see anyone here ask a general scripting question,
be given an answer in vbs, then announce that actually, they are using
javascript.

That explains my thought processes. Whether it is a *good* thing to
assume vbs in an question, I can't answer, but I think it is a
reasonably *safe* thing to do. Nevertheless, I see the merit in your
suggestion regarding the added clarification of language in answers in
the future.

--
Mike Brind

Aug 12 '06 #27
Mike Brind wrote:
I have yet to see anyone here ask a general scripting
question, be given an answer in vbs, then announce that
actually, they are using javascript.

That explains my thought processes. Whether it is a *good*
thing to assume vbs in an question, I can't answer, but I
think it is a reasonably *safe* thing to do.
It's a little bit if a chicken & egg problem, isn't it? Since Microsoft
documentation provides essentially *zero* ASP examples written in JScript,
(a) many people are unaware that JScript is an option, and (b) people
searching for JScript solutions usually announce their language.

This is further compounded by the fact that ASP/VBScript examples (whether
on msdn or elsewhere) almost always lack the details needed to do the job in
JScript. The JScript author needs to learn, for example, that these two are
equivalent:

VBScript ----
request("abc")

JScript -----
Request.QueryString("abc").Item ||
Request.Form("abc").Item ||
Request.Cookies("abc").Item ||
Request.ClientCertificates("abc").Item ||
Request.ServerVariables("abc").Item

That is a lot of conditional assignment, and the kind of knowledge that has
to be *sought*, due to the poor quality of VBScript (and by implication,
ALL) ASP examples.

All of these conspire against the individal who wants to use JScript to
write ASP. So only the determined do. It's a shame, too. I think ASP in
JScript is a marvelously flexible and powerful thing.

So yes, I agree that it is safe to assume VBScript in almost all cases.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Aug 13 '06 #28

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6385
by: SilverWolf | last post by:
I need some help with sorting and shuffling array of strings. I can't seem to get qsort working, and I don't even know how to start to shuffle the array. Here is what I have for now: #include...
9
2599
by: buda | last post by:
Hi, I've been wondering for a while now (and always forgot to ask :) what is the exact quote from the Standard that forbids the use of (&array) (when x >= number_of_columns) as stated in the FAQ...
3
2683
by: Pol Bawin | last post by:
Hi All, One : I have a property that get/set a array of an abstract class A By default my array is null In the propertygrid, It is not works correctly when my array is null. (when my array...
11
2245
by: Geoff Cox | last post by:
Hello, I am trying to get a grip on where to place the initialization of two arrays in the code below which was created using Visual C++ 2005 Express Beta 2... private: static array<String^>^...
28
2416
by: anonymous | last post by:
I have couple of questions related to array addresses. As they belong to the same block, I am putting them here in one single post. I hope nobody minds: char array; int address; Questions...
104
16852
by: Leszek | last post by:
Hi. Is it possible in javascript to operate on an array without knowing how mamy elements it has? What i want to do is sending an array to a script, and this script should add all values from...
51
23624
by: Pedro Graca | last post by:
I run into a strange warning (for me) today (I was trying to improve the score of the UVA #10018 Programming Challenge). $ gcc -W -Wall -std=c89 -pedantic -O2 10018-clc.c -o 10018-clc...
7
6410
by: heddy | last post by:
I have an array of objects. When I use Array.Resize<T>(ref Object,int Newsize); and the newsize is smaller then what the array was previously, are the resources allocated to the objects that are...
8
1476
by: T. Wintershoven | last post by:
Hello all, I have a form with some checkboxes. The names of these checkboxes come from an array. When i click the submit button the resultcode doesn't recognize the names when i want to check...
4
4553
by: mab464 | last post by:
I have this code on my WAMP server running on my XP machine if ( isset( $_POST ) ) { for($i=0; $i<count($_POST);$i++) { if ($ans != NULL ) $ans .= ", " . $_POST ; // Not the first...
0
7137
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7416
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7506
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5656
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5062
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4732
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1571
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
779
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
443
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.