Added FORGET
This commit is contained in:
@ -10,3 +10,4 @@ forth definitions also internals
|
|||||||
: .s ." <" depth n. ." > " raw.s cr ;
|
: .s ." <" depth n. ." > " raw.s cr ;
|
||||||
only forth definitions
|
only forth definitions
|
||||||
|
|
||||||
|
: forget ( "name" ) ' dup >link current @ ! >name drop here - allot ;
|
||||||
|
|||||||
@ -13,3 +13,16 @@ e: test-.s
|
|||||||
.s
|
.s
|
||||||
out: <0>
|
out: <0>
|
||||||
;e
|
;e
|
||||||
|
|
||||||
|
e: test-forget
|
||||||
|
context @ @
|
||||||
|
current @
|
||||||
|
here
|
||||||
|
: foo 123 ;
|
||||||
|
: bar foo foo ;
|
||||||
|
: baz bar bar * * ;
|
||||||
|
forget foo
|
||||||
|
here = assert
|
||||||
|
current @ = assert
|
||||||
|
context @ @ = assert
|
||||||
|
;e
|
||||||
|
|||||||
Reference in New Issue
Block a user