Diff for /gforth/Attic/search-order.fs between versions 1.11 and 1.12

version 1.11, 1995/04/29 14:51:20 version 1.12, 1995/10/07 17:38:19
Line 84  Only Forth also definitions Line 84  Only Forth also definitions
   
 lookup A! \ our dictionary search order becomes the law  lookup A! \ our dictionary search order becomes the law
   
   ' Forth >body constant forth-wordlist \ "forth definitions get-current" and "forth-wordlist" should produce the same wid
   
   
 \ get-order set-order                                  14may93py  \ get-order set-order                                  14may93py
   
 : get-order  ( -- wid1 .. widn n )  : get-order  ( -- wid1 .. widn n )
Line 106  lookup A! \ our dictionary search order Line 109  lookup A! \ our dictionary search order
 : body> ( data -- cfa )  0 >body - ;  : body> ( data -- cfa )  0 >body - ;
   
 : .voc  body> >name .name ;  : .voc  body> >name .name ;
 : order  1 vp @  DO  vp I cells + @ .voc  -1 +LOOP  2 spaces  : order ( -- )  \  search-ext
   current @ .voc ;      \g prints the search order and the @code{current} wordlist.  The
 : vocs   voclink  BEGIN  @ dup @  WHILE  dup 0 wordlist-link - .voc  REPEAT      \g standard requires that the wordlists are printed in the order
   drop ;      \g in which they are searched. Therefore, the output is reversed
       \g with respect to the conventional way of displaying stacks. The
       \g @code{current} wordlist is displayed last.
       get-order 0
       ?DO
           .voc
       LOOP
       4 spaces get-current .voc ;
   : vocs ( -- ) \ gforth
       \g prints vocabularies and wordlists defined in the system.
       voclink
       BEGIN
           @ dup @
       WHILE
           dup 0 wordlist-link - .voc
       REPEAT
       drop ;
   
 Root definitions  Root definitions
   

Removed from v.1.11  
changed lines
  Added in v.1.12


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>