Jay Pinkman <[email protected]> schrieb:
>i'm trying to build a stack inside the dictionary. here's how:
>
>0 value         cache
>4096 constant   #cache
>
>: commit        cache , ;
>: revert        cache cell - @ cp ! ;
>: buffer        here to cache #cache allot ;
>
>: cache{        commit buffer ;
>: }cache        revert buffer ;
>
>this code won't work because gforth doesn't recognize cp as a defined
>word. i tried to use markers but it didn't pan out. i'm relatively new
>to both forth and gforth so maybe i'm missing something obvious.
>
>jay

Try dp instead of cp. (Dictionary pointer).
--
Bernd Paysan
"If you want it done right, you have to do it yourself!"
http://bernd-paysan.de

Reply via email to