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

  1. Chapter5                L_O_V_E FORTH
  2.  
  3.  
  4.  
  5. 5.0  Using DOS Commands in LOVE Forth
  6.      --------------------------------
  7.  
  8.  
  9.     L.O.V.E. Forth can invoke the MSDOS command interpreter to perform
  10. tasks such as deleting files, copying files or displaying the contents of a
  11. directory, with a simple and flexible DOS command. The DOS command is a
  12. Forth word in the   TOOLBOX   vocabulary.
  13.  
  14. To use the DOS command interactively just type:
  15.  
  16.        DOS
  17.  
  18.      followed by the MSDOS command that is desired and press the
  19.      <return> key.
  20.  
  21.      Example:
  22.  
  23.      DOS dir/w  <cr>
  24.  
  25.      will display the contents of the current directory and then
  26.      return to Forth.
  27.  
  28.  
  29.     DOS commands can be embedded in source code screens or in text
  30. files with the restriction that there be no other Forth words on that line
  31. after the actual MSDOS command appears. The reason for this is that
  32. L.O.V.E. Forth passes all the information after the word DOS up to the
  33. carriage return character, if interpreting from the keyboard or a text
  34. file, or up to the end of a screen line, if interpreting from a block.  Any
  35. Forth words on the rest of that line will confuse the MSDOS command
  36. interpreter.
  37.  
  38.     If a programmer desires to remain in the shell of the command
  39. interpreter for an extended period, the DOS command can be used to invoke a
  40. new shell by stating:
  41.  
  42.        DOS   <cr>
  43.  
  44.     The MSDOS prompt will appear on the display.  To return to Forth
  45. the word "exit" must be typed to exit from the shell.