The Lambda Lab
/
projects
/
forth.jl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
FORGET works with vocabularies. Updated readme.
[forth.jl.git]
/
src
/
lib_8_vocab.4th
diff --git
a/src/lib_8_vocab.4th
b/src/lib_8_vocab.4th
index
34b8251
..
e0ba306
100644
(file)
--- a/
src/lib_8_vocab.4th
+++ b/
src/lib_8_vocab.4th
@@
-1,9
+1,16
@@
\ Vocabulary management
\ Vocabulary management
+\ Forget word and everything defined after it in compilation dict
: FORGET
: FORGET
- BL WORD FIND >LINK ( find the word, gets the dictionary entry address )
+ BL WORD CURRENT @ FINDVOCAB ( find the word, gets the dictionary entry address )
+
+ 0= if
+ drop exit
+ then
+
+ >link
+
DUP @ LATEST ! ( set LATEST to point to the previous word )
DUP @ LATEST ! ( set LATEST to point to the previous word )
- H ! ( and store H with the dictionary address )
;
: HIDE
;
: HIDE
@@
-11,9
+18,6
@@
DUP @ F_HIDDEN OR SWAP !
;
DUP @ F_HIDDEN OR SWAP !
;
-: VOCAB>LATEST ( vcfa -- vlatest )
- 1+ @ @ ;
-
\ Create new vocabulary
: VOCABULARY
create 0 ,
\ Create new vocabulary
: VOCABULARY
create 0 ,