It's overloaded and confusing.
<%@ Language=VBScript %>
<%
Option Explicit
dim an, a, eq, e, plus
an = "&" + "&"
a = "&"
eq = "=" & "="
e = "="
plus = "+"
%>
<script type="text/vbscript">
sub alertit(a, b)
msgbox "" & a + "<%=eq%>" + b & "<%=e%>TRUE", 64, "TRUE"
end sub
</script>
<script type="text/javascript">
var a<%=e%>"<%=a%>" <%=plus%> "<%=a%>", b<%=e%>"<%=an%>";
if(a <%=eq%> '&&' <%=an%> b <%=eq%> '&&') {
alert("a" <%=plus%> "<%=eq%>" <%=plus%> "b" <%=plus%> "<%=e%>" <%=plus%>
"TRUE");
alertit(a, b);
}
</script>
"CJM" <> wrote in message
news:...
"Bob Barrows" <> wrote in message
news:u$...
> Aaron Bertrand [MVP] wrote:
>
> > I don't think George is trying to state that this isn't
> > well-documented. I think he is just implying (and I tend to agree)
> > that the default recommendation for string operations be +
>
> 
> No, that is your interpretation of what George was saying. I think "It may
> help if someone at Microsoft knows how to write VBScript." is a pretty
clear
> statement. And a very incorrect statement in this case.
Actually, I agree with you both.
I agree George said what Bob said, but I think George meant what Aaron said
he meant...! George...??
Personally agree with Aaron. And Bob.
....er, I think.
Yes '+' is overloaded, and thus can be used fairly in this example. But
surely '&' would be the better default choice.
Chris