home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / forth / compiler / love / chap08.doc < prev    next >
Text File  |  1993-04-11  |  2KB  |  56 lines

  1. Chapter8                L_O_V_E FORTH
  2.  
  3.  
  4.  
  5. 8.0  Vocabularies in L.O.V.E. Forth
  6.      ------------------------------
  7.  
  8.     L.O.V.E. Forth implements the Forth-83 standard vocabularies with
  9. some of the words in the experimental proposal by William F.  Ragsdale.
  10. The specification for vocabularies in the Forth-83 standard leaves much to
  11. be desired by expert and novice programmers alike.  Ragsdale's proposal
  12. solves many of the problems with a simple and powerfull concept.  His ideas
  13. have been so widely implemented, that they can be considered an integral
  14. and crucial part of the Forth-83 standard.
  15.  
  16.          L.O.V.E. Forth implements the concept of a 'search order' by means
  17. of a special stack, the vocabulary stack, which contains the parameter
  18. field addresses of vocabularies, that are to be searched when interpreting
  19. or compiling.  The search order may be inspected at any time by typing the
  20. word ORDER.
  21.  
  22.  
  23.        Example:
  24.                ORDER  <cr>
  25.  
  26.        Displays:
  27.  
  28.                Search Order: -> TOOLBOX FORTH ROOT
  29.                Definitions:  FORTH
  30.  
  31.          The  vocabularies are currently being searched by first searching
  32. TOOLBOX   then   FORTH   and finally   ROOT .  All new DEFINITIONS   that
  33. are compiled are currently being put into the  FORTH vocabulary.
  34.  
  35.          The   ROOT   vocabulary is always the last vocabulary in the search
  36. order, and contains the Forth words to alter the search order, to create
  37. new vocabularies, to list the words in a vocabulary and to FORGET   words
  38. from the dictionary.
  39.  
  40.  
  41. 8.1  Specifying a Search Order
  42.      -------------------------
  43.  
  44.          The search order can changed at any time by executing a combination
  45. of the words   ONLY   and   ALSO   with vocabulary names.
  46.  
  47. Example:
  48.        To compile a word into the MSDOS vocabulary, while also making use of
  49.        some MSDOS file functions...
  50.  
  51.                ONLY FORTH ALSO MSDOS DEFINITIONS
  52.  
  53.        makes the search order:
  54.  
  55.                Search Order: -> MSDOS FORTH ROOT
  56.                Definitions:  MSDOS