Comparison: Difference between revisions
Content added Content deleted
(atomicity) |
No edit summary |
||
Line 3: | Line 3: | ||
The comparison primitives in K are <code><</code>, <code>></code> and <code>=</code> which stand for lesser than, greater than and equal to respectively. Comparisons are [[atomicity|fully atomic]]. |
The comparison primitives in K are <code><</code>, <code>></code> and <code>=</code> which stand for lesser than, greater than and equal to respectively. Comparisons are [[atomicity|fully atomic]]. |
||
Characters are compared as bytes, except in oK which supports Unicode and compares characters by their code points. |
|||
Character comparison is done via ASCII codes/UTF-8 code points, based on the implementation. |
|||
The comparison functions always give a boolean value, 1 or 0. |
The comparison functions always give a boolean value, 1 or 0. |