X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=forth.jl.git;a=blobdiff_plain;f=src%2Flib_8_vocab.4th;h=e0ba306dfcfa4c2a50cbd7e7d8c82ad8350166d1;hp=34b82517c42ce91c0c9c0051164f819424b8cbb4;hb=56f581c25775f4244cd60d5943a5beb46a9ccafb;hpb=4437e4ba8255ef676faf94682a8ecc2579d0f12d diff --git a/src/lib_8_vocab.4th b/src/lib_8_vocab.4th index 34b8251..e0ba306 100644 --- a/src/lib_8_vocab.4th +++ b/src/lib_8_vocab.4th @@ -1,9 +1,16 @@ \ Vocabulary management +\ Forget word and everything defined after it in compilation dict : 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 ) - H ! ( and store H with the dictionary address ) ; : HIDE @@ -11,9 +18,6 @@ DUP @ F_HIDDEN OR SWAP ! ; -: VOCAB>LATEST ( vcfa -- vlatest ) - 1+ @ @ ; - \ Create new vocabulary : VOCABULARY create 0 ,