473,416 Members | 1,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

JScript and VBscript

If I have a .ASP page that runs JScript code - is it possible to include an
..ASP page that runs VBscript???
Jul 19 '05 #1
29 5977
no, you can't mix two languages the way you're asking.
you could convert one into a WSC and use that, or you could use <script
runat="server"> rather than ASP delimiters...

________________________________________
Atrax. MVP, IIS
http://rtfm.atrax.co.uk/

newsflash : Atrax.Richedit 1.0 now released.
http://rtfm.atrax.co.uk/infinitemonk...trax.RichEdit/

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #2
Thanks ;)

"Atrax" <at***@dontspamatrax.co.uk> skrev i melding
news:Ov**************@tk2msftngp13.phx.gbl...
no, you can't mix two languages the way you're asking.
you could convert one into a WSC and use that, or you could use <script
runat="server"> rather than ASP delimiters...

________________________________________
Atrax. MVP, IIS
http://rtfm.atrax.co.uk/

newsflash : Atrax.Richedit 1.0 now released.
http://rtfm.atrax.co.uk/infinitemonk...trax.RichEdit/

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #3
"Atrax" wrote:

you could convert one into a WSC and use that, or you could use
<script runat="server"> rather than ASP delimiters...


Server.Execute() is also available...
--
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. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #4
Be aware of the execution order:
1.. Script in <SCRIPT> elements in nondefault languages
2.. Inline script
3.. Script in <SCRIPT> elements in the default language
--
Roland

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.
Jul 19 '05 #5
"Roland Hall" wrote:

Be aware of the execution order...


Curiously enough, this can be "circumvented". A function (or Function or
Sub) can be called from any block regardless of which one defines it -- and
regardless of the "execution order".

--
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. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #6
help & support, searching for information stored on this
computor,recieving genetic failure.
-----Original Message-----
If I have a .ASP page that runs JScript code - is it possible to include an..ASP page that runs VBscript???
.

Jul 19 '05 #7
help & support,searching for information on this
computor,recieving genetic failure
-----Original Message-----
If I have a .ASP page that runs JScript code - is it possible to include an..ASP page that runs VBscript???
.

Jul 19 '05 #8
an*******@discussions.microsoft.com wrote:
help & support, searching for information stored on this
computor,recieving genetic failure.


Yes! It's obvious a mutation has occurred ...

Bob
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #9
an*******@discussions.microsoft.com wrote:
help & support,searching for information on this
computor,recieving genetic failure


The mutation is spreading! Quick, someone call the CDC! ;-)
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #10
Only limitation is that you can't pass a querystring to Server.Execute().
"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
"Atrax" wrote:

you could convert one into a WSC and use that, or you could use
<script runat="server"> rather than ASP delimiters...
Server.Execute() is also available...
--
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. Please do not contact me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.

Jul 19 '05 #11
"Mike Florio" wrote:

Only limitation is that you can't pass a querystring to
Server.Execute().


I'd say there are a few more. The calling script shares no variables or
functions with the one being executed, for example.
--
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. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #12
"Dave Anderson" wrote:
"Roland Hall" wrote:
Be aware of the execution order...
Curiously enough, this can be "circumvented". A function (or Function or
Sub) can be called from any block regardless of which one defines it --

and regardless of the "execution order".


Ok but wouldn't that require having knowledge of the order of execution?

--
Roland

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.

Jul 19 '05 #13

"Bob Barrows" wrote:
an*******@discussions.microsoft.com wrote:
help & support, searching for information stored on this
computor,recieving genetic failure.


Yes! It's obvious a mutation has occurred ...


You crack me up! (O:=
Jul 19 '05 #14
> Ok but wouldn't that require having knowledge of the order of execution?

No. Put the code in the different language into subroutines or functions
(not inline). Then call those functions in the desired order from inline
code in whichever language that you want to be "dominant".

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Roland Hall" <nobody@nowhere> wrote in message
news:uN**************@TK2MSFTNGP11.phx.gbl...
"Dave Anderson" wrote:
"Roland Hall" wrote:
Be aware of the execution order...


Curiously enough, this can be "circumvented". A function (or Function or
Sub) can be called from any block regardless of which one defines it --

and
regardless of the "execution order".


Ok but wouldn't that require having knowledge of the order of execution?

--
Roland

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.

Jul 19 '05 #15
"Mark Schupp" wrote:
Ok but wouldn't that require having knowledge of the order of execution?


No. Put the code in the different language into subroutines or functions
(not inline). Then call those functions in the desired order from inline
code in whichever language that you want to be "dominant".


Correct. Without knowing the order of execution and not doing it as you
suggested means you could get into trouble, which is my whole point!

I prefer this answer: http://www.aspfaq.com/show.asp?id=2045 - It is better
not to mix inline code with script blocks runat=server but should you have
to, knowing the order of execution is better than not knowing.

Mixed-language script blocks not in subs/functions. They get executed out
of the order they were placed on the page.
http://kiddanger.com/lab/langorder.asp

<%@ Language=VBScript %>
<% Option Explicit %>
<script type="text/vbscript" language="vbscript" runat=server>
Response.Write("one <br />")
</script>
<script type="text/javascript" language="javascript" runat=server>
Response.Write("two <br />")
</script>
<%
Response.Write("three <br />")
%>
<script type="text/javascript" language="javascript" runat=server>
Response.Write("four <br />")
</script>
<script type="text/vbscript" language="vbscript" runat=server>
Response.Write("five <br />")
</script>

Mixed-language script blocks in subs/functions called from inline script.
They get executed in the order called from inline script.
http://kiddanger.com/lab/langorder2.asp

<%@ Language=VBScript %>
<% Option Explicit %>
<script type="text/vbscript" language="vbscript" runat=server>
sub vb1()
Response.Write("one <br />")
end sub
</script>
<script type="text/javascript" language="javascript" runat=server>
function js2() {
Response.Write("two <br />")
}
</script>
<%
vb1
js2
Response.Write("three <br />")
js4
vb5
%>
<script type="text/javascript" language="javascript" runat=server>
function js4() {
Response.Write("four <br />")
}
</script>
<script type="text/vbscript" language="vbscript" runat=server>
sub vb5()
Response.Write("five <br />")
end sub
</script>

Ridiculous example:

Default language VBScript, calling a JScript script block which calls a
VBScript script inline function and writes the result from inline vbscript.
If the ?n=# where # = a decimal number is not present, an error is called
from vbscript inline script to a vbscript script block sub to display an
error and syntax.

http://kiddanger.com/lab/langorder3.asp
http://kiddanger.com/lab/langorder3.asp?n=65535

<%@ Language=VBScript %>
<% Option Explicit %>
<script type="text/jscript" language="jscript" runat=server>
function jsHex(jsn) {
return vbHex(jsn);
}
</script>
<script type"text/vbscript" language="vbscript" runat=server>
sub showError()
Response.Write("<div style=""border: 1px solid black""><div
style=""border-bottom: 1px solid black; padding-right: 2px;
background-color: #ffe0e0""><span style=""color: white; background-color:
red; border-right: 1px solid black"">Error!</span> Value expected.</div>" &
vbCrLf & _
"syntax: http://kiddanger.com/lab/langorder3.asp?n=" &
server.HTMLEncode("<a decimal number>") & "<br />" & vbCrLf & _
"Ex. http://kiddanger.com/lab/langorder3.asp?n=546</div>")
end sub
</script>
<%
function vbHex(vbn)
vbHex = Hex(vbn)
end function

dim n
n = Request.QueryString("n")
if n = "" then
showError
else
Response.Write("Decimal: " & n & " = Hex: " & jsHex(n) & "<br />")
end if
%>

IMHO, not informing someone of the order of execution is ridiculous. That
was my whole point. I know it's possible to make it work but not knowing
could cause problems.

--

Roland

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.
Jul 19 '05 #16
Thanks - didn't know that.

"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:eE**************@TK2MSFTNGP10.phx.gbl...
"Mike Florio" wrote:

Only limitation is that you can't pass a querystring to
Server.Execute().
I'd say there are a few more. The calling script shares no variables or
functions with the one being executed, for example.
--
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. Please do not contact me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.

Jul 19 '05 #17
"Roland Hall" wrote:

Ok but wouldn't that require having knowledge of the order of execution?
No. Put the code in the different language into subroutines or functions
(not inline). Then call those functions in the desired order from inline
code in whichever language that you want to be "dominant".


Correct. Without knowing the order of execution and not doing it as you
suggested means you could get into trouble, which is my whole point!


And your point is wrong. If you follow Mark's advice, you CANNOT get in
trouble, regardless of whether you know the order of execution or not.

...IMHO, not informing someone of the order of execution is ridiculous.
That was my whole point.
Which one was your whole point -- that it is ridiculous or that it could
lead to trouble?

I know it's possible to make it work but not knowing could cause problems.


Likewise with not knowing anything else about the technology you are working
with. What's your point (whole or otherwise)?
--
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. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #18
"Dave Anderson" wrote:
And your point is wrong. If you follow Mark's advice, you CANNOT get in
trouble, regardless of whether you know the order of execution or not.


If you do not know there is an execution order and you DO NOT put all
non-default language script in subroutines called from inline script then
you can get in trouble. How difficult is that for you to understand? Mark
obviously knows about the execution order and thus uses this coding
methodology. Where is the crime in letting others know WHY you should try
to do it the way Mark suggested? I know you prefer the "Dave Anderson, Just
Follow Me Blindly Method" but where is the education in that? Your
methodology doesn't work.

301 Error.
Dave's Response: Problem with your keyboard, go into the BIOS setup and
disable checking for the keyboard. You'll never experience this error
again. Don't ask questions. This is a need to know basis and I don't think
you need to know. You'll never need to know why if you just do as I say.

User replaces keyboard and still experiences same error. Perhaps it's not
plugged in? Educating the user in this case might be beneficial?! Perhaps
the color-coded ps/2 ports, the mouse and keyboard are plugged into, might
be reversed?! Or maybe the user's keyboard is wireless and the batteries
are dead?!

Educating someone as to WHY something should try to be done a certain way to
avoid possible errors is a good thing. Not educating someone as to WHY and
the possible errors that could occur is just plain dumb. If Aaron has a FAQ
re: this issue, perhaps there are a lot of people that need some education
regarding issues with the execution order of mixed-language server-side
script blocks with inline script and how to avoid them?!

--
Roland

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.
Jul 19 '05 #19
"Roland Hall" wrote:

If you do not know there is an execution order and you DO NOT
put all non-default language script in subroutines called from
inline script then you can get in trouble.
Define trouble.

I think anyone with rudimentary troubleshooting skills can mix languages in
ASP without "getting in trouble". I would further suggest that someone
willing to use two languages is already savvy enough to explore the inherent
issues to a point of reasonable understanding.

But more to the point, order of execution is just SOMETHING TO KNOW about
ASP. If you create an instance of something with VBScript and don't know
that you're supposed to later set the variable reference to Nothing, you can
get in trouble. If you put objects into session or application variables,
you can get in trouble, whether you know it or not. If you don't understand
the difference between an object and its default property, you can get in
trouble.

BFD. Mixing scripting languages doesn't have to be intuitive, it merely
should be documented. And it is:
http://msdn.microsoft.com/library/de..._vbnjscrpt.asp
[Incoherent "Dave Anderson, Just Follow Me Blindly Method" rant snipped]
If Aaron has a FAQ re: this issue, perhaps there are a lot of
people that need some education regarding issues with the
execution order of mixed-language server-side script blocks
with inline script and how to avoid them?!


My point is that people should understand the technology they are using, and
the existence of the FAQ is not inconsistent with that or anything else I
have said in this thread.
--
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. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #20
"Dave Anderson" wrote:
"Roland Hall" wrote:

If you do not know there is an execution order and you DO NOT
put all non-default language script in subroutines called from
inline script then you can get in trouble.
Define trouble.

Code not executing in the order you wanted it to?
I think anyone with rudimentary troubleshooting skills can mix languages in ASP without "getting in trouble". I would further suggest that someone
willing to use two languages is already savvy enough to explore the inherent issues to a point of reasonable understanding. One does not define the other however, you did say 'suggest.' Using two
languages does not prove you know them. Also, knowing the two languages, in
this case JScript/Javascript and VBScript does not mean you understand the
order of execution of the ASP processor.
But more to the point, order of execution is just SOMETHING TO KNOW about
ASP. That's all I have been saying. It is better to know than not know. From
now on, I'm drawing pictures. (O:=
If you create an instance of something with VBScript and don't know
that you're supposed to later set the variable reference to Nothing, you can get in trouble. Define trouble. (O:=
The same is true if you don't wear a condom.
If you put objects into session or application variables,
you can get in trouble, Define trouble. (O:=
The same is true if you don't call her the next day.
whether you know it or not. n/a
If you don't understand
the difference between an object and its default property, you can get in
trouble. Define trouble. (O:=
The same is true if you don't know the difference between your *ss and a
hole in the ground.
BFD. It could be.
Mixing scripting languages doesn't have to be intuitive, it merely
should be documented. The Bible has been around for many years but how many cannot recite the 10
commandments?
There is a lot of documentation out there you and I have not read. Just
because it is documented doesn't mean it is known by the person trying to
implement it. None of my ASP books actually reference the execution order,
AFAIK. I read a post in here long ago and found out that way. I don't use
runat=server so I have never experienced this issue but it was by chance,
not by knowledge, even though it has been documented since 1998.
And it is:
http://msdn.microsoft.com/library/de..._vbnjscrpt.asp
Perhaps Microsoft thought it was necessary for people to KNOW?!
My point is that people should understand the technology they are using, I agree but you cannot know everything. This NG demonstrates that even the
most seasoned developer sometimes has to ask for help.
and
the existence of the FAQ is not inconsistent with that or anything else I
have said in this thread.

It's not just a river in Egypt anymore. (O:=

--
Roland

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/tre...er/default.asp
-MSDN Library-
http://msdn.microsoft.com/library/default.asp
Jul 19 '05 #21
"Roland Hall" "wrote":

Define trouble. Code not executing in the order you wanted it to?


That can happen in many programming scenarios. This "order of execution"
setting is not unique in that regard.

Using two languages does not prove you know them.
Yawn. My point remains. If you're willing to use a tool without knowing what
it does, that's your problem. If you can't spend a little time learning
about the technology you're using, then I certainly have little sympathy for
you when things turn out unexpectedly.

In my opinion, a programmer without curiousity is a drone.

That's all I have been saying. It is better to know than not know.


That's NOT all you have been saying. You started by questioning my assertion
that execution order can be rendered moot with a simple approach. Remember
this?

DAVE: Curiously enough, this can be "circumvented". A
function (or Function or Sub) can be called from
any block regardless of which one defines it --
and regardless of the "execution order".

ROLAND: Ok but wouldn't that require having knowledge
of the order of execution?

MARK SCHUPP: No.

I outlined a means by which you can eliminate the entire issue of execution
order, and by which virtually all of the potential shortcomings of mixed
languages could be solved. You didn't bother to test my assertion before
throwing out a "rebuttal"**. Doing so would have saved us all the rest of
this conversation.
**In this case, a "Yeah-buttal", and a weak one at that. I *did* phrase it
quite unambiguously. What do you suppose I meant by [regardless of the
"execution order"]?

Mixing scripting languages doesn't have to be intuitive, it
merely should be documented.


The Bible has been around for many years but how many cannot
recite the 10 commandments?


Please cease the non sequitur barrage.
--
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. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #22
> you can get in trouble. How difficult is that for you to understand?
Mark
obviously knows about the execution order and thus uses this coding
methodology. Where is the crime in letting others know WHY you should try
Actually I don't know the actual execution order and I don't care. Always
TELL the computer what YOU want it to do, never hope that things will just
work out.

It should be simple enough to determine the actual execution order by
experimentation (documentation is not always correct anyway). Probably could
have been done in 10% of the time spent on this discussion thread.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Roland Hall" <nobody@nowhere> wrote in message
news:ee**************@TK2MSFTNGP10.phx.gbl... "Dave Anderson" wrote:
And your point is wrong. If you follow Mark's advice, you CANNOT get in
trouble, regardless of whether you know the order of execution or not.
If you do not know there is an execution order and you DO NOT put all
non-default language script in subroutines called from inline script then
you can get in trouble. How difficult is that for you to understand?

Mark obviously knows about the execution order and thus uses this coding
methodology. Where is the crime in letting others know WHY you should try
to do it the way Mark suggested? I know you prefer the "Dave Anderson, Just Follow Me Blindly Method" but where is the education in that? Your
methodology doesn't work.

301 Error.
Dave's Response: Problem with your keyboard, go into the BIOS setup and
disable checking for the keyboard. You'll never experience this error
again. Don't ask questions. This is a need to know basis and I don't think you need to know. You'll never need to know why if you just do as I say.

User replaces keyboard and still experiences same error. Perhaps it's not
plugged in? Educating the user in this case might be beneficial?! Perhaps the color-coded ps/2 ports, the mouse and keyboard are plugged into, might
be reversed?! Or maybe the user's keyboard is wireless and the batteries
are dead?!

Educating someone as to WHY something should try to be done a certain way to avoid possible errors is a good thing. Not educating someone as to WHY and the possible errors that could occur is just plain dumb. If Aaron has a FAQ re: this issue, perhaps there are a lot of people that need some education
regarding issues with the execution order of mixed-language server-side
script blocks with inline script and how to avoid them?!

--
Roland

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.

Jul 19 '05 #23
"Mark Schupp" wrote:
you can get in trouble. How difficult is that for you to understand? Mark
obviously knows about the execution order and thus uses this coding
methodology. Where is the crime in letting others know WHY you should

try
Actually I don't know the actual execution order Since it was in my first post in this thread, that is a false statement.
and I don't care. Always
TELL the computer what YOU want it to do, never hope that things will just
work out. Telling the computer runat=server in the default lang. before the
non-default lang. will not work because the ASP processor has its own
execution order so it must be in a sub/function and called from inline
script to avoid issues.
It should be simple enough to determine the actual execution order by
experimentation (documentation is not always correct anyway).

Ah! Ok. Words of wisdom. Well, then why ask questions in a NG if
experimentation will make you all-knowing...and forget about the docs,
they're unreliable.

Order of execution is important even on the client-side and not everyone is
a seasoned developer. It's BS to tell someone, "Just keep pluggin' away,
you'll get it and forget about the docs, they're unreliable."

Ex.
This doesn't work - mismatch error

<SCRIPT LANGUAGE="VBScript">
function doubledNumber(aNumber)
doubledNumber = doubleMe(aNumber)
end function
document.write("The answer is " & doubledNumber("2"))
</SCRIPT>

<SCRIPT LANGUAGE="JScript">
function doubleMe(aNumber){
return aNumber * 2;
}
</SCRIPT>

Change the order of the script blocks and it works:

<SCRIPT LANGUAGE="JScript">
function doubleMe(aNumber){
return aNumber * 2;
}
</SCRIPT>
<SCRIPT LANGUAGE="VBScript">
function doubledNumber(aNumber)
doubledNumber = doubleMe(aNumber)
end function
document.write("The answer is " & doubledNumber("2"))
</SCRIPT>

It's modified a bit but not much. It's from some documentation from
Microsoft. It must be unreliable.

http://msdn.microsoft.com/library/en...rpt_servscript

--
Roland

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/tre...er/default.asp
-MSDN Library-
http://msdn.microsoft.com/library/default.asp
Jul 19 '05 #24
"Roland Hall" "wrote":

This doesn't work - mismatch error

[client-side example]
That's irrelevant. This is an ASP forum, and the discussion has focused on
the behavior of asp.dll, not on that of a client-side browser. I note that
your code generates no errors for the following browsers (vacuously, of
course):

Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.5) Gecko/20031007
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2) Opera 7.11 [en]

In any case, it's unreasonable to assume you know the implemetation of
scripting support for every version of every browser. We *do* know and have
reasonable expectation of continued support for the behavior of asp.dll, and
that is the only thing that matters in here.

Change the order of the script blocks and it works:
Same fallacy...
It's modified a bit but not much. It's from some documentation
from Microsoft. It must be unreliable.


Cute. You quote an article titled "Using VBScript and JScript on a Web
Page", which specifically warns that this example ill not work. Rather than
show mixed scripting behavior to be "unreliable", you provide the evidence
that the documentation is correct for both the asp.dll behavior and for
Internet Explorer's client-side behavior.

Offering evidence that your argument is wrong is perhaps not the textbook
way of persuading people, but it *does* have the attraction of novelty.

--
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. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #25
You know what Dave, you exhaust me. I just deleted all my responses because
it's a dead horse and you obviously have an agenda. So, Happy New Year.

--
Roland

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/tre...er/default.asp
-MSDN Library-
http://msdn.microsoft.com/library/default.asp
Jul 19 '05 #26
Dave Anderson wrote:
"Roland Hall" wrote:
Be aware of the execution order...


Curiously enough, this can be "circumvented". A function (or Function or
Sub) can be called from any block regardless of which one defines it -- and
regardless of the "execution order".


[posted after Roland became "exhausted"]

The above is a good methodology to follow to prevent confusion. However...

If one were given working code already in production and written by
developer(s) who freely mixed code in different languages without doing
what you describe above, then it would be _necessary_ to be aware of the
subtleties of execution order. Were one to encounter such code a good
first step would be to refresh one's memory on execution order and then
_possibly_ set about refactoring the code in the manner you describe
above. I say "possibly" because there's _always_ a cost and some danger
in modifying working code!

[Meta-observation about this thread:]
This was a very interesting thread for me because I hadn't revisited the
topic in some time and also because of the delightful fact that _all_
parties were presenting correct information and and useful examples but
nonetheless were arguing. For that reason I'm glad that they persisted
even though they seemed somewhat puzzled by each other's posts.

I think Dave's post (above) marks a point whereafter the thread becomes
inadvertently contentious. As the topic unfolds, Roland, Dave and Mark
present useful and interesting information and examples. Had all three
been in the same room discussing the question, any differences would
have been quickly resolved, assumptions more clearly laid out and
misunderstanding more easily avoided. But those of us not in that same
room would never have heard the discussion and would have remained less
enlightened. So thank you!
[End Meta-observation]

Good Luck and Happy New Year to all,
Michael D. Kersey

Programmer's Threat(accompanied by musical theme from "The Good, The
Bad, and the Ugly"): "Touch that code and you own it!"

Jul 19 '05 #27
"Michael D. Kersey" wrote:

If one were given working code already in production and
written by developer(s) who freely mixed code in different
languages without doing what you describe above, then it
would be _necessary_ to be aware of the subtleties of
execution order.


If you are suggesting that it would be necessary to be aware of those
subtleties beforehand, I'm not sure I agree, but you do underscore my point
that we should understand the technology we use.

Were I in such a situation, my A PRIORI analysis would almost certainly
alert me to the fact that such subtleties exist, and I would either search
for documentation or test my assumptions to reach clarity on the issue.

In any case, I agree that such awareness necessarily must precede the work.
--
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. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #28
"Michael D. Kersey" wrote:
: Dave Anderson wrote:
: > "Roland Hall" wrote:
: >
: >>Be aware of the execution order...
: >
: > Curiously enough, this can be "circumvented". A function (or Function or
: > Sub) can be called from any block regardless of which one defines it --
and
: > regardless of the "execution order".
:
: [posted after Roland became "exhausted"]
:
: The above is a good methodology to follow to prevent confusion. However...
:
: If one were given working code already in production and written by
: developer(s) who freely mixed code in different languages without doing
: what you describe above, then it would be _necessary_ to be aware of the
: subtleties of execution order. Were one to encounter such code a good
: first step would be to refresh one's memory on execution order and then
: _possibly_ set about refactoring the code in the manner you describe
: above. I say "possibly" because there's _always_ a cost and some danger
: in modifying working code!
:
: [Meta-observation about this thread:]
: This was a very interesting thread for me because I hadn't revisited the
: topic in some time and also because of the delightful fact that _all_
: parties were presenting correct information and and useful examples but
: nonetheless were arguing. For that reason I'm glad that they persisted
: even though they seemed somewhat puzzled by each other's posts.
:
: I think Dave's post (above) marks a point whereafter the thread becomes
: inadvertently contentious. As the topic unfolds, Roland, Dave and Mark
: present useful and interesting information and examples. Had all three
: been in the same room discussing the question, any differences would
: have been quickly resolved, assumptions more clearly laid out and
: misunderstanding more easily avoided. But those of us not in that same
: room would never have heard the discussion and would have remained less
: enlightened. So thank you!
: [End Meta-observation]
:
: Good Luck and Happy New Year to all,
: Michael D. Kersey
:
: Programmer's Threat(accompanied by musical theme from "The Good, The
: Bad, and the Ugly"): "Touch that code and you own it!"

Hi Michael...

Good observation. I think we actually agreed more than we disagreed. Dave
thinks it is good to 'know the code you are developing in' and I think
informing someone of how something works is part of that. That sounds the
same to me but what do I know?

Had we been in the same room, perhaps it would have been more academic and
more evident or perhaps more adjectives would have been used?! So,
whichever your perspective, Dave is wrong! *roar* ...runs out laughing...
Happy New Year!

--
Roland

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/tre...er/default.asp
-MSDN Library-
http://msdn.microsoft.com/library/default.asp

Jul 19 '05 #29
"Roland Hall" wrote:

...whichever your perspective, Dave is wrong!


My New Year's resolution is to stop being wrong, no matter what your
perspective.

--
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. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #30

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

Similar topics

20
by: Harag | last post by:
Hi All. I'm stating out doing some web developing. I was wondering which of the server side languages should I concentrate on and learn. I Know CSS, HTML, T-SQL I can look at the client...
4
by: Harag | last post by:
Hi All I currently thinking of converting from my little knowledge of VBscript to jScript ASP. With this in mind I'm looking at my current code to see how it will convert over to Jscript. ...
15
by: Laser Lu | last post by:
In ASP and CGI, which one would be executed more fast and has the better execution efficiency in IIS? And how about writing CGI in VB? -- Best regards, Laser Lu
3
by: Christopher Brandsdal | last post by:
Hi! Maby this is wring newsgroup.. I'm using ASP / VBscript on my own cms system, but I needed to use some jscript to make something work... I'm new to jscript, so here is a simple question:...
10
by: Christopher Brandsdal | last post by:
I have this string: /sites/binaer/demo/fil/Winnie-the-Pooh 1024x768.jpg If I wanted to cut everything before Winnie-the-Pooh 1024x768.jpg, how would I do this? In VBScript I could find the...
7
by: joe | last post by:
I am having problems checking for the value of an XMLDOM object . Lets say my XMLDOM object was successfully created as objXMLDoc, and that has several nodes on it. In the case of a VBScript loop...
7
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - What is JScript? ----------------------------------------------------------------------- JScript is...
2
by: tunk | last post by:
I dont know where to start my question so let me tell you my story :) The ASP that cause me trouble is running on IIS that set ASP default language to JScript instead of VBScript. This ASP page...
1
by: Andrew Wan | last post by:
How can VBScript code access JScript code variables in the same ASP page? <SCRIPT LANGAUGE="VBScript"> Dim a a = 10 </SCRIPT> <SCRIPT LANGUAGE="JScript"> Response.Write(a); </SCRIPT>
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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
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...

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.