Re: When does != == !=?

by "Srinivasan Ramakrishnan" <srinivar(at)md3.vsnl.net.in>

 Date:  Sun, 2 Jul 2000 23:29:50 +0530
 To:  "Jason Brett" <jbbrett(at)zigzagnet.com>
 Cc:  <hwg-languages(at)hwg.org>
 References: 
  todo: View Thread, Original
Yep, looks like you got it. Happy to help out.

-Srini


>A-HA!
>
>The problem wasn't with comparing operators, it was in the pattern matching
>I was using to find the operator. I was comparing "==" to "== ", which of
>course is != !
>
>Thanks everyone!
>
>Jason Brett
>ZigZag Internet Solutions
>Powerful Solutions. Explosive Results.

----- Original Message -----
From: Jason Brett <jbbrett(at)zigzagnet.com>
To: Srinivasan Ramakrishnan <srinivar(at)md3.vsnl.net.in>
Sent: Sunday, July 02, 2000 9:40 PM
Subject: RE: When does != == !=?


| That is exactly what I'm trying to achieve. But the operators I am
comparing
| are already assigned to variables. In other words, the expression reads:
|
| if (myValue == listValue) { // do next stuff
|
| So they should already be being evaluated as strings, right?
|  (say for example myValue= "==" and listValue = "==")
|
| Jason Brett
| ZigZag Internet Solutions
| Powerful Solutions. Explosive Results.
|
| -----Original Message-----
| From: owner-hwg-languages(at)hwg.org [mailto:owner-hwg-languages(at)hwg.org]On
| Behalf Of Srinivasan Ramakrishnan
| Sent: Sunday, July 02, 2000 2:12 AM
| To: Jason Brett; Hwg-Languages@Hwg. Org
| Subject: Re: When does != == !=?
|
|
| When the user selects an operator from a select, he is selecting a string
| "==" and not a literal operator as ==, so comparison is very easy.
|
| if ("==" == "!="){
| // do something.......
|
| }
|
| If this was not what you were trying to achieve, please elucidate.
|
| -Srini
|
| ----- Original Message -----
| From: Jason Brett <jbbrett(at)zigzagnet.com>
| To: Hwg-Languages@Hwg. Org <hwg-languages(at)hwg.org>
| Sent: Sunday, July 02, 2000 8:53 AM
| Subject: When does != == !=?
|
|
| | Hey folks,
| |
| | I'm trying to do a comparison between two operators in javascript. Is
that
| | possible?
| |
| | I have a dropdown list where the user selects an operator to use. Later
I
| | need to compare the user's selection to determine my action.
| |
| | Is this possible? If not, what's a workaround?
| |
| | Example:
| |
| | User choices:
| | ==
| | !=
| | >
| | <
| | <=
| | >=
| |
| | My statement says (variables translated here) if ( == == == ) { ...
| | but that particular case returns false.
| |
| | What do I do?
| |
| | Thanks in advance!
| |
| | Jason Brett
| | ZigZag Internet Solutions
| | Powerful Solutions. Explosive Results.
| |
| |
|
|

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA