[gforth] / gforth / look.fs  

gforth: gforth/look.fs

Diff for /gforth/look.fs between version 1.12 and 1.13

version 1.12, Sun Jan 3 21:48:37 1999 UTC version 1.13, Sat May 27 09:41:28 2000 UTC
Line 52 
Line 52 
     dup [ unlock rom-dictionary area lock ]      dup [ unlock rom-dictionary area lock ]
     literal literal within      literal literal within
     IF      IF
         >name dup ?? <>          >head-noprim dup ?? <>
     ELSE      ELSE
         forth-wordlist @ (look)          forth-wordlist @ (look)
     THEN ;      THEN ;
 [ELSE]  [ELSE]
 : look ( cfa -- lfa flag )  : look ( cfa -- lfa flag )
     >name dup ??? <> ;      >head-noprim dup ??? <> ;
 [THEN]  [THEN]
   
 [ELSE]  [ELSE]
   
 : PrimStart ['] true >name ;  : PrimStart ['] true >head-noprim ;
   
 : look ( cfa -- lfa flag )  : look ( cfa -- lfa flag )
     dup in-dictionary?      dup in-dictionary?
     IF      IF
         >name dup ??? <>          >head-noprim dup ??? <>
     ELSE      ELSE
         PrimStart (look)          PrimStart (look)
     THEN ;      THEN ;
   
 [THEN]  [THEN]
 [THEN]  [THEN]
   
   : >head ( cfa -- nt|0 ) \ gforth to-head
       \G tries to find the name token nt of the word represented by cfa;
       \G returns 0 if it fails.  This word is not absolutely reliable,
       \G it may give false positives and produce wrong nts.
       look and ;
   
   ' >head ALIAS >name \ gforth to-name
   \G old name of @code{>head}


Generate output suitable for use with a patch program
Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help