1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-24 00:28:05 +11:00
collapseos/blk/011
2020-04-14 10:04:09 -04:00

17 lines
537 B
Plaintext

Chained comparisons
The unit "cmp.fs" contains words to facilitate chained
comparisons with a single reference number. This allows, for
example, to easily express "a == b or a == c" or "a > b and a <
c".
The way those chained comparison words work is that, unlike
single comparison operators, they don't have a "n1 n2 -- f"
signature, but rather a "n1 f n2 -- n1 f" signature. That is,
each operator "carries over" the reference number in addition
to the latest flag.
(cont.)