This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
4rpl:baserpl:comparators:eq [2019/03/16 17:31] – virgilw | 4rpl:baserpl:comparators:eq [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ~~NOTOC~~ | ||
- | |||
- | ====== eq ====== | ||
- | eq | ||
- | |||
- | ===== Description ===== | ||
- | Top two items are popped from the stack and compared for equality. 0 or 1 is pushed back to the stack where 1 indicates equal and 0 (zero) ndicates not equal | ||
- | |||
- | the equal/not equal evaluation can also be performed with “true” (1) and false(0), respectively. | ||
- | |||
- | ===== Examples ===== | ||
- | <code 4rpl> | ||
- | if (1 eq (1)) | ||
- | trace(" | ||
- | endif | ||
- | |||
- | # alternate example | ||
- | |||
- | 1 dup eq | ||
- | if true | ||
- | trace ("one is always one") | ||
- | endif | ||
- | </ | ||