Skip to content

Commit

Permalink
doc/quick-guide: Update
Browse files Browse the repository at this point in the history
  • Loading branch information
lhmouse committed Dec 4, 2023
1 parent 2b9f5f3 commit f3ef413
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions doc/quick-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,14 +335,14 @@ Blank cells indicate that the operands are always unordered; types not listed
in this table (function, opaque and object) are unordered with everything,
including themselves:

| |null |boolean |integer |real |string |array |
|:-------|:---------|:-------|:-------|:-------|:------|:-------|
|null |identical | | | | | |
|boolean | |total | | | | |
|integer | | |total |partial | | |
|real | | |partial |partial | | |
|string | | | | |total | |
|array | | | | | |partial |
| |null |boolean |integer |real |string |array |
|:-----------|:---------|:-------|:-------|:-------|:------|:-------|
|**null** |identical | | | | | |
|**boolean** | |total | | | | |
|**integer** | | |total |partial | | |
|**real** | | |partial |partial | | |
|**string** | | | | |total | |
|**array** | | | | | |partial |

Real numbers may be unordered due to special values called not-a-number (NaN)
which can be produced by an invalid arithmetic operation, such as `0.0 / 0.0`
Expand All @@ -352,16 +352,16 @@ There are eight operators about comparison, categorized as two ranks: the
_comparison operators_, `<`, `<=`, `>`, `>=`; and the _equality operators_,
`==`, `!=`, `<=>`, `</>`. Their results are:

| |if less |if equal |if greater |if unordered |
|:-----|:----------|:----------|:----------|:-------------------|
|`<` |`true` |`false` |`false` |throws an exception |
|`<=` |`true` |`true` |`false` |throws an exception |
|`>` |`false` |`false` |`true` |throws an exception |
|`>=` |`false` |`true` |`true` |throws an exception |
|`==` |`false` |`true` |`false` |`false` |
|`!=` |`true` |`false` |`true` |`true` |
|`<=>` |`-1` |`0` |`+1` |`"[unordered]"` |
|`</>` |`false` |`false` |`false` |`true` |
| |if less |if equal |if greater |if unordered |
|:---------|:----------|:----------|:----------|:-------------------|
|**`<`** |`true` |`false` |`false` |throws an exception |
|**`<=`** |`true` |`true` |`false` |throws an exception |
|**`>`** |`false` |`false` |`true` |throws an exception |
|**`>=`** |`false` |`true` |`true` |throws an exception |
|**`==`** |`false` |`true` |`false` |`false` |
|**`!=`** |`true` |`false` |`true` |`true` |
|**`<=>`** |`-1` |`0` |`+1` |`"[unordered]"` |
|**`</>`** |`false` |`false` |`false` |`true` |

Comparison operators have higher precedence than equality operators, so `a <
b == c < d` is interpreted as `(a < b) == (c < d)`, instead of `((a < b) ==
Expand Down

0 comments on commit f3ef413

Please sign in to comment.