Oracle SQL supposedly has four inequality operators:
!=^=<>¬=
(PL/SQL operators are a little different. They allow ~= instead of ¬=. But that is not directly relevant here.)
The manual includes the warning “Some forms of the inequality condition may be unavailable on some platforms.” This applies to at least the 4th option, ¬=. That syntax doesn’t work for me on Windows, Linux, or Solaris.
My questions are:
- What platforms support
¬=? - What platforms, if any, do not support
!=,^=, or<>? Is it worth avoiding one of those to ensure my code is as portable as possible?
Here’s my best guess as to the derivation and availability of the various inequality operators:
<>– the original. Used by a number of languages (BASIC, Pascal, etc).Probably available on all platforms.
!=– from C and it’s derivatives (C, C++, Java, C#, etc, blah). I expectthis is available on all platforms.
¬=– This operator is probably only available on IBM mainframes. I knowit’s not supported on HP-UX as I just tried it. Near and dear
to my heart. From the language PL/I (that’s capital ‘i’, not ‘1’,
although it represents the Roman numeral “one”, and thus the language
is “pee ell one”. I knew you wanted to know that :-), IBM’s bastard
stepchild…ahem, I mean “delightful combination” of FORTRAN, Algol,
and a touch of COBOL. PL/I was the second high-level computer
language I learned and the first one I used in making a living as
a software developer. From the Good Old Days, when men were men,
women were women, and computers were water-cooled. Isn’t that
right, Josiah..? (And ten points extra credit for those who can
identify where THAT line comes from!)
^=– I suspect this is meant to be similar to the preceding “IBM-only”operator, making it an “IBM-ish” operator for use on computers which
lack the IBM “¬” (not) character. Probably supported on all platforms.
FWIW I always use
<>. Old habits, like old programmers, die hard. 🙂