]> git.gag.com Git - debian/pforth/commitdiff
Add definition of 2CONSTANT
authorMax Barraclough <maxbarraclough@gmail.com>
Sun, 14 Mar 2021 21:12:36 +0000 (21:12 +0000)
committerGitHub <noreply@github.com>
Sun, 14 Mar 2021 21:12:36 +0000 (14:12 -0700)
Part of DOUBLE NUMBER word set.

fth/system.fth

index 2bd959d2eb59c9648fd92a5c76f799c10f12763d..5b199f157d257ba1ec821ffb5a83f3f22ecea283 100644 (file)
         dup cell+ @ swap @
 ;
 
+: 2CONSTANT ( n1 n2 <name> -c- ) ( -x- n1 n2 )
+        CREATE , , ( n1 n2 -- )
+        DOES> 2@   ( -- n1 n2 )
+;
 
 : ABS ( n -- |n| )
         dup 0<