mirror of
https://github.com/nineties/planckforth
synced 2024-12-26 21:58:42 +01:00
Add max and min
This commit is contained in:
parent
5d43fa67ed
commit
0b7363016f
1 changed files with 5 additions and 0 deletions
|
@ -769,6 +769,11 @@ alias-builtin xor ^
|
|||
repeat
|
||||
; immediate
|
||||
|
||||
\ === Integer Arithmetic (that require control flow words) ===
|
||||
\ ( a b -- c )
|
||||
: max 2dup > if drop else nip then ;
|
||||
: min 2dup < if drop else nip then ;
|
||||
|
||||
\ === Multiline Comment ===
|
||||
|
||||
: '(' [ key ( ] literal ;
|
||||
|
|
Loading…
Reference in a new issue