projects
/
debian
/
pforth
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd36def
)
Add definition of 2CONSTANT
author
Max Barraclough
<maxbarraclough@gmail.com>
Sun, 14 Mar 2021 21:12:36 +0000
(21:12 +0000)
committer
GitHub
<noreply@github.com>
Sun, 14 Mar 2021 21:12:36 +0000
(14:12 -0700)
Part of DOUBLE NUMBER word set.
fth/system.fth
patch
|
blob
|
history
diff --git
a/fth/system.fth
b/fth/system.fth
index 2bd959d2eb59c9648fd92a5c76f799c10f12763d..5b199f157d257ba1ec821ffb5a83f3f22ecea283 100644
(file)
--- a/
fth/system.fth
+++ b/
fth/system.fth
@@
-321,6
+321,10
@@
dup cell+ @ swap @
;
+: 2CONSTANT ( n1 n2 <name> -c- ) ( -x- n1 n2 )
+ CREATE , , ( n1 n2 -- )
+ DOES> 2@ ( -- n1 n2 )
+;
: ABS ( n -- |n| )
dup 0<