# !=

**URL:** <https://boards.straightdope.com/t/255974>\
**Category:** Factual Questions\
**Created:** [July 20, 2004, 8:29am UTC](https://boards.straightdope.com/t/255974 "2004-07-20T08:29:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cisco](https://avatars.discourse-cdn.com/v4/letter/c/ccd318/32.png) [@Cisco](https://boards.straightdope.com/u/Cisco)\
**Post date:** [July 20, 2004, 8:29am UTC](https://boards.straightdope.com/t//255974/1 "2004-07-20T08:29:28Z")

</div>

😕

I take from context that it means “does not equal” or something like that but where did it come from? At first I thought it was part of a computer language but I’ve noticed that the percentage of people that use it here seems to be much higher than the percentage of computer programmers here. Also, this is the only place I’ve ever seen it.

Did I miss the bus on a new trend or are there a bunch of comp-sci posers running around here?

---

<div class="post-metadata">

**Author:** ![Smeghead](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@Smeghead](https://boards.straightdope.com/u/Smeghead)\
**Post date:** [July 20, 2004, 9:40am UTC](https://boards.straightdope.com/t//255974/2 "2004-07-20T09:40:10Z")

</div>

I’ve seen it for years in both computer science and pure academic math settings. !, in general, means “not” or “the opposite of”.

---

<div class="post-metadata">

**Author:** ![SpaceDog](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/spacedog/32/9932_2.png) [@SpaceDog](https://boards.straightdope.com/u/SpaceDog)\
**Post date:** [July 20, 2004, 9:42am UTC](https://boards.straightdope.com/t//255974/3 "2004-07-20T09:42:06Z")

</div>

> [@Cisco](#):
>
> I take from context that it means “does not equal” or something like that but where did it come from? At first I thought it was part of a computer language but I’ve noticed that the percentage of people that use it here seems to be much higher than the percentage of computer programmers here. Also, this is the only place I’ve ever seen it.

It’s from computing certainly, I think it’s from C originally but it could pre-date that too, I know it’s not in Pascal. I can’t help you with how it became popular.

Actually I’ll take a guess, as we can’t do the mathmatical struck-through = easily I’ve seen people use = for not equals. I guess since != is similar and is familiar to more people that it just took over.

SD

---

<div class="post-metadata">

**Author:** ![LSLGuy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lslguy/32/5813_2.png) [@LSLGuy](https://boards.straightdope.com/u/LSLGuy)\
**Post date:** [July 20, 2004, 11:44am UTC](https://boards.straightdope.com/t//255974/4 "2004-07-20T11:44:50Z")

</div>

Amongst the hundreds of computer programming languages and dialects there are 3 common computer language symbols for not-equals.

One is !=, the second is \<\>, and the third requires a special symbol that may not come through on your system, but looks like a em-dash with a short tail hanging down from the right edge: ¬=.

The second version is not very compatible with HTML, and particularly in the early days of online life, posts or docs containing \<\> would either be rejected, or the symbol would be eaten completely, so nothing appears on screen. IOW a statement that “a \<\> b” would render as “a b”, which sort of loses the point.

And the third version requires an unusual symbol that may not be included in the font you’re viewing my work in.

So as a result, != wins out; it’s the most typographically reliable in the online world.

There’s no computer language I’m aware of which uses /=. Perhaps math grad students used it when typing term papers before the advent of math-specific word processors, but I’d sooner expect them to use an overstrike so the / was on top of the =. The ability to make up combination characters is/was the only real advantage of typewriters over word processors.

---

<div class="post-metadata">

**Author:** ![Cisco](https://avatars.discourse-cdn.com/v4/letter/c/ccd318/32.png) [@Cisco](https://boards.straightdope.com/u/Cisco)\
**Post date:** [July 20, 2004, 12:03pm UTC](https://boards.straightdope.com/t//255974/5 "2004-07-20T12:03:34Z")

</div>

Thanks for the info. It’s been awhile since I’ve done any programming but I remember using \<\>.

In any case, outside of the context of programming or math problems I think I’ll stick with “does not equal”. I don’t have to hit shift or fumble for the equal sign, and for some reason the look of != just seems to grind on my nerves. I guess it just looks…pretentious.

---

<div class="post-metadata">

**Author:** ![Tinker\_Grey](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tinker_grey/32/8136_2.png) [@Tinker\_Grey](https://boards.straightdope.com/u/Tinker_Grey)\
**Post date:** [July 20, 2004, 2:02pm UTC](https://boards.straightdope.com/t//255974/6 "2004-07-20T14:02:11Z")

</div>

For R&D work and proof-of-concept, my colleagues and I use a lot of MATLAB before developing in C.

MATLAB’s “not equal” is “~=”. It’s kind of odd considering we are reasonably sure that MATLAB itself is developed in C++.

---

<div class="post-metadata">

**Author:** ![RiverRunner](https://avatars.discourse-cdn.com/v4/letter/r/977dab/32.png) [@RiverRunner](https://boards.straightdope.com/u/RiverRunner)\
**Post date:** [July 20, 2004, 2:09pm UTC](https://boards.straightdope.com/t//255974/7 "2004-07-20T14:09:10Z")

</div>

And of course in COBOL there is “NOT =”, but that doesn’t have the same smell of geekdom.  
RR

---

<div class="post-metadata">

**Author:** ![Small\_Clanger](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@Small\_Clanger](https://boards.straightdope.com/u/Small_Clanger)\
**Post date:** [July 20, 2004, 2:46pm UTC](https://boards.straightdope.com/t//255974/8 "2004-07-20T14:46:17Z")

</div>

> [@Cisco](#):
>
> . . . for some reason the look of != just seems to grind on my nerves. I guess it just looks…pretentious.

A coder will read != as “not-equals” and !true as “not true”. It’s about as pretentious as using French, the degree of pretentiousness depends on the proportion of French speakers in the audience.  
At the risk of taking this too seriously I’d say if you aren’t a coder or you’re writing for an audience who won’t _all_ get it then using != is naff.  
If you can cite an example we can judge on the pose-osity.

It comes from C and is used in all the C-like curly brace languages and in SQL and in loads of others.

---

<div class="post-metadata">

**Author:** ![Small\_Clanger](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@Small\_Clanger](https://boards.straightdope.com/u/Small_Clanger)\
**Post date:** [July 20, 2004, 2:56pm UTC](https://boards.straightdope.com/t//255974/9 "2004-07-20T14:56:07Z")

</div>

> [@Cisco](#):
>
> . . .I remember using \<\>.

Where I work we use the Oracle language PL/SQL where != and \<\> are interchangable. You can tell the background of programmers by which one they use. Coders who learned Visual Basic first use \<\>, those who learned C/C++ use !=.

---

<div class="post-metadata">

**Author:** ![tim314](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tim314/32/3468_2.png) [@tim314](https://boards.straightdope.com/u/tim314)\
**Post date:** [July 20, 2004, 4:14pm UTC](https://boards.straightdope.com/t//255974/10 "2004-07-20T16:14:26Z")

</div>

> [@Small Clanger](#):
>
> Coders who learned Visual Basic first use \<\>

Or any kind of BASIC, it’s not limited to Visual Basic.

!= seems to be the most common for newer languages, many of which have syntax based on C. Java, for example.

While it definitely started with programmers, the use of != on message boards is becoming so common that it’s basically risen (or sank, depending on your point of view) to the level of any other Internet abbreviation, like LOL, IIRC, SDMB, etc.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [July 20, 2004, 6:46pm UTC](https://boards.straightdope.com/t//255974/11 "2004-07-20T18:46:43Z")

</div>

> [@](#):
>
> There’s no computer language I’m aware of which uses /=.

I know of only one language that does so. ISETL, a software package for teaching/doing abstract algebra, uses /= to mean “not equal”. It caught me off-guard at first, too.

When in a context which allows for custom characters (a whiteboard and markers, for instance), the equals sign with the slash through it is definitely preferred, but other than that, != is the best option. \<\> is not exactly synonymous; the statement “i \<\> 1” is false (where i is the imaginary unit), but the statement “i != 1” is true. \<\> only works well where there is a natural ordering on the objects being compared.

---

<div class="post-metadata">

**Author:** ![Trigonal\_Planar](https://avatars.discourse-cdn.com/v4/letter/t/0ea827/32.png) [@Trigonal\_Planar](https://boards.straightdope.com/u/Trigonal_Planar)\
**Post date:** [July 20, 2004, 6:57pm UTC](https://boards.straightdope.com/t//255974/12 "2004-07-20T18:57:01Z")

</div>

One thing to keep in mind is that computer programming is no longer a subject perched atop the Ivory Towers as it once was. From my experience, computer programming/computer science is now standard issue in highschool curricula (sp?).

The point of this being that there are far more people out there who do in fact have _some_ knowledge of computer science.

---

<div class="post-metadata">

**Author:** ![Captain\_Carrot](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@Captain\_Carrot](https://boards.straightdope.com/u/Captain_Carrot)\
**Post date:** [July 20, 2004, 7:20pm UTC](https://boards.straightdope.com/t//255974/13 "2004-07-20T19:20:24Z")

</div>

At my school, Computer Science is a required course for graduation. In fact, many, many people take APCS after Compsci sophomore or junior year. I’m taking it in summer schol after sophomore year, and then taking APCS junior, myself.

Of course, my school’s requirements for graduation are fairly ridiculous, so YMMV.

---

<div class="post-metadata">

**Author:** ![gonzoron](https://avatars.discourse-cdn.com/v4/letter/g/a6a055/32.png) [@gonzoron](https://boards.straightdope.com/u/gonzoron)\
**Post date:** [July 20, 2004, 7:50pm UTC](https://boards.straightdope.com/t//255974/14 "2004-07-20T19:50:05Z")

</div>

> [@Chronos](#):
>
> I know of only one language that does so. ISETL, a software package for teaching/doing abstract algebra, uses /= to mean “not equal”. It caught me off-guard at first, too.

VHDL does this too. One of many annoyances with VHDL.

(Although VHDL is technically a hardware description language and not a programming language.)

---

<div class="post-metadata">

**Author:** ![Mathochist](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@Mathochist](https://boards.straightdope.com/u/Mathochist)\
**Post date:** [July 20, 2004, 7:58pm UTC](https://boards.straightdope.com/t//255974/15 "2004-07-20T19:58:08Z")

</div>

> [@Smeghead](#):
>
> I’ve seen it for years in both computer science and pure academic math settings. !, in general, means “not” or “the opposite of”.

In academic math it’s almost always traceable to a computer science influence. A pure mathematician would strike through the relational operator to negate it.

---

<div class="post-metadata">

**Author:** ![Capt.Ridley\_s\_Shooting\_Party](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@Capt.Ridley\_s\_Shooting\_Party](https://boards.straightdope.com/u/Capt.Ridley_s_Shooting_Party)\
**Post date:** [July 20, 2004, 9:08pm UTC](https://boards.straightdope.com/t//255974/16 "2004-07-20T21:08:47Z")

</div>

Prolog uses /=, I think. I hate that language.

---

<div class="post-metadata">

**Author:** ![Skywatcher](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/skywatcher/32/254_2.png) [@Skywatcher](https://boards.straightdope.com/u/Skywatcher)\
**Post date:** [July 20, 2004, 9:25pm UTC](https://boards.straightdope.com/t//255974/17 "2004-07-20T21:25:25Z")

</div>

> [@SpaceDog](#):
>
> Actually I’ll take a guess, as we can’t do the mathmatical struck-through = easily I’ve seen people use = for not equals.

Just wanted to point out that the struck-throuh = is an extended character in the Symbol font. Alt+0185.

---

<div class="post-metadata">

**Author:** ![Mbossa](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Mbossa](https://boards.straightdope.com/u/Mbossa)\
**Post date:** [July 20, 2004, 9:39pm UTC](https://boards.straightdope.com/t//255974/18 "2004-07-20T21:39:04Z")

</div>

[Haskell](http://www.haskell.org) is another language that uses ‘/=’ for ‘not equal to’.

Another reason why ‘/=’ may not be so popular is that it has an entirely different meaning in C: divide and assign. ‘x /= y’ is shorthand for ‘x = x / y’ in C. OTOH, people seem to be no problem using ‘=’ as equality, even though it is the assignment operator in C (’==’ is the C equality operator).

---

<div class="post-metadata">

**Author:** ![Rattlehead02](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/rattlehead02/32/3944_2.png) [@Rattlehead02](https://boards.straightdope.com/u/Rattlehead02)\
**Post date:** [July 20, 2004, 9:43pm UTC](https://boards.straightdope.com/t//255974/19 "2004-07-20T21:43:45Z")

</div>

Not sure about other languages, but in Visual Foxpro (Foxpoo?), \<\> and != can also be expressed as #. As in 5 # 6.

Just my ! so useful $.02

---

<div class="post-metadata">

**Author:** ![1010011010](https://avatars.discourse-cdn.com/v4/letter/1/ea666f/32.png) [@1010011010](https://boards.straightdope.com/u/1010011010)\
**Post date:** [July 20, 2004, 10:34pm UTC](https://boards.straightdope.com/t//255974/20 "2004-07-20T22:34:58Z")

</div>

Euphoria uses !=… it’s kinda sorta C++ based.

/= is also valid, but is a shorthand.

A /= B is A = A/B  
Similarly with \*-, +=, and -=.

I’d wager this type of shorthand has more to do with /= not being favored.

[Next page](https://boards.straightdope.com/t/255974.md?page=2)
