Added FORGET

This commit is contained in:
Brad Nelson
2021-02-11 21:26:34 -08:00
parent 615042583f
commit 45071d9eeb
2 changed files with 14 additions and 0 deletions

View File

@ -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 ;

View File

@ -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