Skip to content

Desktop Forth system requirements

ruv edited this page Mar 5, 2020 · 4 revisions

Some requirements for a desktop Forth system for better usability.

Command line interface

  1. Support batch processing

    1. batch mode, non interactive mode
  2. Don't output anything (except the error messages) in batch mode.

    1. It is better to output the error messages into STDERR in this case.
  3. Be quiet when any command line options are specified.

    1. Don't print a name, version, motd or something alike.
  4. Proper working when STDIN is a pipe (not a keyboard).

    1. Example: echo 2 3 + . | forth should print 5 and return control to the host system.
  5. The default exception handler should terminate the process if an exception occurs on processing the command line options.

  6. Conventional command line options

    1. the file names in the command line should be included one after another in the given order
    2. -e "source code" evaluate the given code and proceed
    3. --help print short manual and return
    4. --version print version and return