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

  1. Chapter9                L.O.V.E. FORTH
  2.  
  3.  
  4.  
  5.  
  6. 9.0   Working In L.O.V.E. Forth
  7.       -------------------------
  8.  
  9.          Here are some notes on how to do day-to-day work in L.O.V.E.
  10. Forth.  A good starting point for viewing the features is given in the
  11. shareware demo LOVES.EXE .
  12.  
  13.  
  14. 9.1  Help
  15.      ----
  16.  
  17.          For help while using the system, load the Hyper Helper with the DOS
  18. command:   HM LOVE   before running Forth.  Or execute  GO.BAT  or
  19. MIN.BAT .   The help system is subsequently invoked with the key sequence:
  20. HELP or  HELP  forth word, eg help loop .
  21.  
  22.  
  23. 9.2   Directories
  24.       -----------
  25.  
  26.          Usually, the programmer copies Forth to the working directory,
  27. including source code etc.  When copying the EXE to another directory, be
  28. sure to also copy the  *.VTR files.  These are the virtual vocabularies.
  29. Alternatively, the   DOS   APPEND   command can be used to direct DOS to
  30. the appropriate directory.
  31.  
  32.  
  33. 9.3   Versions of L.O.V.E. Forth
  34.       --------------------------
  35.  
  36.         The minimum system, with the smallest number of features compiled
  37. is called MINnnn.EXE, where nnn is the version number (eg.  MIN129.EXE ).
  38. This is the program executed by   MIN.BAT .  On top of this can be the
  39. block disk words   (LOADBLK.TXT)   and / or the RPN assembler.  Be sure to
  40. save the system again with   SAVE"   after loading the desired features
  41. (eg.  SAVE" LOVERPN.EXE" ).
  42.  
  43.          Various source code modules can be loaded on top of the minimum
  44. system.  These include local variables, multiple   CFA   words,
  45. miscellaneous words.  Dependancies:
  46.  
  47.         LOADBLK.TXT     also loads MISC.TXT
  48.         ARRAY.TXT       requires   MCFA.TXT
  49.  
  50. All others can be loaded independently.
  51.  
  52.  
  53. 9.4   Upper and Lower Case
  54.       --------------------
  55.  
  56.          Normally, the case of a word is ignored.  By setting variable
  57. CASEMATCH   to true, however, will cause L.O.V.E. Forth to match the case
  58. of the word as it originally was compiled. All the L.O.V.E. Forth standard
  59. words were compiled in upper case. Compilation is slightly faster in case
  60. match mode, but it is usually desireable to type interactive commands with
  61. case ignored.
  62.  
  63.  
  64.  
  65. 9.5  Text strings
  66.      ------------
  67.  
  68.          Frequently the programmer requires control characters in strings.
  69. This is difficult to do in any text file, as control characters may be
  70. editor commands, or printer control codes.  L.O.V.E.  Forth supports   AWK
  71. style escape commands.  These are summarized as follows:
  72.  
  73.           \b   : backspace
  74.           \f   : formfeed
  75.           \n   : newline, linefeed
  76.           \r   : carriage return
  77.           \t   : tab
  78.           \ddd : decimal value, 1 to 3 digits
  79.           \c   : where 'c' is any other character literally
  80.           \\   : for backslash
  81.           \"   : for "
  82.  
  83.         These can be used in text strings compiled with the words:
  84.         ."  "  ,"  .(
  85.  
  86.  
  87. 9.6  Vocabularies
  88.      ------------
  89.  
  90.          See also the section describing vocabularies.  The usual vocabulary
  91. for working in Forth is FORTH.  The words controlling the dictionary search
  92. order are in vocabulary   ROOT .   The word   DEVELOP sets the search order
  93. to be    ROOT   FORTH   and   TOOLBOX   which contains programming aids.
  94. The vocabulary implementation is that of a stack, ALSO   pushes the stack
  95. and   VDROP   drops the top of the stack.  ONLY resets it to   ROOT   only.
  96.  
  97.  
  98.  
  99. 9.7  Access to DOS
  100.      -------------
  101.  
  102.          Typing the word DOS followed by a DOS command line, executes that
  103. in a DOS shell.  Typing DOS followed by nothing, enters the DOS shell
  104. (typing EXIT returns to Forth).  This is one way to invoke a text editor.
  105. Note that there must be enough memory to invoke DOS.  If too much memory is
  106. allocated in   MAXHEAP   (see instructions on saving the system), DOS
  107. cannot be entered.
  108.  
  109.  
  110.  
  111. 9.8  Windows 3.0/3.1
  112.      ---------------
  113.  
  114.          The multitasking features of this environment are useful.  One can
  115. run L.O.V.E. Forth from a DOS prompt, and have an editor running in another
  116. window. The L.O.V.E. Forth icon is provided.