[thelist] Data Shaping and Count

Ken Schaefer Ken at adOpenStatic.com
Wed May 11 01:19:23 CDT 2005


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: thelist-bounces at lists.evolt.org [mailto:thelist-
: bounces at lists.evolt.org] On Behalf Of Matt Warden
: Subject: Re: [thelist] Data Shaping and Count
: 
: Ken,
: 
: On 5/11/05, Ken Schaefer <Ken at adopenstatic.com> wrote:
: > Be careful here. Are we talking about VBScript or Jscript? Or
: PerlScript?
: > Etc.
: 
: See her original message. She's clearly using VBScript.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sure, but you wrote:

"I cannot recall whether ASP shortcuts conditions
...
It doesn't need to be, so languages like java don't."


Joshua wrote:
"ASP does not use short-circuit Boolean evaluation."
And supplied a code snippet as putative proof.

If we take Joshua's code snippet, and rewrite it as so:

<%@Language=JScript%>
<%
if (false && t()) {
	}

function t() {
	Response.Write("abc");
	return true;
}
%>

We see that nothing is output. So support for short-circuiting, or lack of
short-circuiting (assuming that I haven't made an error transcribing the code
from VBScript -> Jscript) isn't intrinsic to ASP. It's entirely dependant on
the language you use to write your ASP pages (and the relevant the script
interpreter).

So, VBScript = no short-circuiting support
Jscript/Javascript = short-circuiting support
Other languages to write ASP pages = who knows, depends on the intepreter

Cheers
Ken

--
www.adOpenStatic.com/cs/blogs/ken/




More information about the thelist mailing list