redefine 2CONSTANT in terms of CREATE DOES>, saving two cells per use
This commit is contained in:
parent
687012b7df
commit
1ceedba773
|
|
@ -1255,7 +1255,8 @@ DEFER REFILL
|
|||
: CONSTANT CREATE LATEST >DFA ! ;
|
||||
|
||||
\ Same for double-cell constants; no DFA trick this time
|
||||
: 2CONSTANT : POSTPONE 2LITERAL POSTPONE ; ;
|
||||
: 2CONSTANT ( x1 x2 -- ) CREATE HERE 2 CELLS ALLOT 2!
|
||||
DOES> ( -- x1 x2 ) 2@ ;
|
||||
|
||||
\ Define a single-cell named variable which returns its data address when executed.
|
||||
\ The initial value is formally undefined. This implementation sets it to NULL.
|
||||
|
|
|
|||
Loading…
Reference in New Issue