overbool
Pushes a copy of the second value of the boolean stack: a b becomes a b a. With a single value it pushes true.
Facts
overbool copies the value that is second from the top of the boolean stack and puts it on top: a b becomes a b a. It's useful for combining two conditions without losing either:
cond
start
*.robage 3 >
*.robage 6 <
overbool and
50 inc
dropbool
51 inc
clearbool
stop| After | Boolean stack (top on the right) |
|---|---|
| the two comparisons | greater than 3, less than 6 |
overbool | greater than 3, less than 6, greater than 3 |
and | greater than 3, (less than 6 and greater than 3) |
dropbool | greater than 3 |
Cell 50 counts the cycles with age (.robage) 4 or 5, and cell 51 all those with age greater than 3: after 10 cycles they hold 2 and 6.
To have two copies of the top one there is dupbool.