--- gforth/look.fs 1997/07/06 14:29:33 1.8 +++ gforth/look.fs 1999/01/03 21:48:37 1.12 @@ -1,6 +1,6 @@ \ LOOK.FS xt -> lfa 22may93jaw -\ Copyright (C) 1995 Free Software Foundation, Inc. +\ Copyright (C) 1995,1996,1997 Free Software Foundation, Inc. \ This file is part of Gforth. @@ -44,23 +44,34 @@ decimal \ !!! nicht optimal! [IFUNDEF] look -[IFUNDEF] dictionary-end has-rom [ELSE] false [THEN] -[IF] +has? ec [IF] +has? rom +[IF] +: look + dup [ unlock rom-dictionary area lock ] + literal literal within + IF + >name dup ?? <> + ELSE + forth-wordlist @ (look) + THEN ; +[ELSE] : look ( cfa -- lfa flag ) - forth-wordlist @ (look) ; + >name dup ??? <> ; +[THEN] [ELSE] : PrimStart ['] true >name ; : look ( cfa -- lfa flag ) - dup dictionary-end forthstart within - IF - PrimStart (look) - ELSE - >name dup ??? <> - THEN ; + dup in-dictionary? + IF + >name dup ??? <> + ELSE + PrimStart (look) + THEN ; [THEN] [THEN]