[thelist] [ASP] [if..then] How to use the OR operator

Madhu Menon webguru at vsnl.net
Sun Nov 24 14:57:01 CST 2002


At 02:08 AM 25-11-02, Dru and Cindy Sellers wrote:
>If i = q1 OR q2 Then Response.Write("Hello")
>
>However this syntax does not seem to work.

That's because your code is actually getting parsed right to left, and so
"q1 or q2" is evaluated first, which of course is not equal to i.

What you want is this:

If (i=q1) OR (i=q2) Then Response.Write("Hello")


That forces the comparison first.

(I *think* that's what you want anyway.)

Regards,

Madhu

<<<   *   >>>
Madhu Menon
Internet User Experience Consultant
e-mail: webguru at vsnl.net   |   Yahoo messenger: cold_logic

Content * Interfaces * Usability * Net Strategy




More information about the thelist mailing list