Difference between revisions of "Not equal"

From Free Pascal wiki
Jump to navigationJump to search
(review)
 
Line 3: Line 3:
 
<div style="float:left; margin: 0 20px 10px 0; padding:40px; font-size:500%; font-family: Georgia; background-color: #f9f9f9; border: 2px solid #777777;"><nowiki> <> </nowiki> </div>
 
<div style="float:left; margin: 0 20px 10px 0; padding:40px; font-size:500%; font-family: Georgia; background-color: #f9f9f9; border: 2px solid #777777;"><nowiki> <> </nowiki> </div>
  
The not equal bigramm <syntaxhighlight lang="pascal" enclose="none"><></syntaxhighlight> (consisting of [[Less than|<syntaxhighlight lang="pascal" enclose="none"><</syntaxhighlight>, the less than symbol]], followed by [[Greater than|<syntaxhighlight lang="pascal" enclose="none">></syntaxhighlight>, the greater than symbol]]) is used to compare two values.
+
The not equal bigramm <syntaxhighlight lang="pascal" inline><></syntaxhighlight> (consisting of [[Less than|<syntaxhighlight lang="pascal" inline><</syntaxhighlight>, the less than symbol]], followed by [[Greater than|<syntaxhighlight lang="pascal" inline>></syntaxhighlight>, the greater than symbol]]) is used to compare two values.
The binary operator evaluates to [[false and true|<syntaxhighlight lang="pascal" enclose="none">true</syntaxhighlight>]], if both values differ from each other.
+
The binary operator evaluates to [[false and true|<syntaxhighlight lang="pascal" inline>true</syntaxhighlight>]], if both values differ from each other.
  
 
== implicit definition ==
 
== implicit definition ==
Note, when the [[Equal|equal operator]] has been overloaded for a custom type, but unequal does not have its own (explicit) definition, [[FPC]] will assume <syntaxhighlight lang="pascal" enclose="none">x <> y</syntaxhighlight> is the same as <syntaxhighlight lang="pascal" enclose="none">not (x = y)</syntaxhighlight>.
+
Note, when the [[Equal|equal operator]] has been overloaded for a custom type, but unequal does not have its own (explicit) definition, [[FPC]] will assume <syntaxhighlight lang="pascal" inline>x <> y</syntaxhighlight> is the same as <syntaxhighlight lang="pascal" inline>not (x = y)</syntaxhighlight>.
  
 
== see also ==
 
== see also ==
* [[symmetric difference|symmetric difference of sets <syntaxhighlight lang="pascal" enclose="none">><</syntaxhighlight>]]
+
* [[symmetric difference|symmetric difference of sets <syntaxhighlight lang="pascal" inline>><</syntaxhighlight>]]
  
 
{{Symbols}}
 
{{Symbols}}
  
 
[[Category:Symbols]]
 
[[Category:Symbols]]

Latest revision as of 17:22, 6 August 2022

English (en) suomi (fi) français (fr) русский (ru)

<>

The not equal bigramm <> (consisting of <, the less than symbol, followed by >, the greater than symbol) is used to compare two values. The binary operator evaluates to true, if both values differ from each other.

implicit definition

Note, when the equal operator has been overloaded for a custom type, but unequal does not have its own (explicit) definition, FPC will assume x <> y is the same as not (x = y).

see also


navigation bar: topic: Pascal symbols
single characters

+ (plus)  •  - (minus)  •  * (asterisk)  •  / (slash)
= (equal)  •  > (greater than)  •  < (less than)
. (period)  •  : (colon)  •  ; (semi colon)
^ (hat)  •  @ (at)
$ (dollar sign)  •  & (ampersand)  •  # (hash)
' (single quote)

character pairs

<> (not equal)  •  <= (less than or equal)  •  := (becomes)  •  >= (greater than or equal)

 •  >< (symmetric difference)  •  // (double slash)