Added FORGET
This commit is contained in:
@ -10,3 +10,4 @@ forth definitions also internals
|
||||
: .s ." <" depth n. ." > " raw.s cr ;
|
||||
only forth definitions
|
||||
|
||||
: forget ( "name" ) ' dup >link current @ ! >name drop here - allot ;
|
||||
|
||||
@ -13,3 +13,16 @@ e: test-.s
|
||||
.s
|
||||
out: <0>
|
||||
;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