5.8 Interactive Mode
As well as having a command line interface with lots of options, FunnelWeb also provides a command language and a mode ("interactive mode") in which commands in the language can be typed interactively. The FunnelWeb command interpreter was created primarily to support regression testing, but can also be useful to FunnelWeb users.
FunnelWeb's command interpreter reads one command per line and can read a stream of commands either from a text file, or from the console. The interpreter can understand over twenty commands. See the FunnelWeb Reference Manual for a full list. However, most of them were designed to support regression testing and will not be of use to the casual user.
The commands that are of greatest use to the casual user are:
! - Ignores the whole line. EXECUTE fn - Execute the specified file. FW options - Invoke FunnelWeb-proper once. SET options - Sets options. SHOW - Displays current options. TRACE ON - Turns command tracing ON. QUIT - Quits FunnelWeb.
To distinguish here between invocations of the FunnelWeb program and FunnelWeb runs inside the shell, we call the latter FunnelWeb proper. The "FW" command invokes FunnelWeb proper with the specified options which take the same syntax as they do on the command line. The only restriction is that none of the action options can be turned on except "+F" which must be turned on.
The "SET" command has the same syntax as the "FW" command except that it does not allow any action options to be specified. It's sole effect is to set default option values for the rest of the run.
The "SHOW" command displays the current default options.
By default, FunnelWeb does not echo the commands that it processes in a script. The "TRACE ON" command turns on such tracing.
These commands can be combined to streamline the use of FunnelWeb. For example, you might wish to create a script called typeset.fws to process a whole group of files.
trace on !This script typesets the whole program. ! Set no listing file, no product files, ! but specify a documentation file ! and specify the directory into which ! it should be placed. set -L -O +T/usr/ross/typeset/ fw prog1 fw prog2 fw prog3 fw prog4
There are a few ways in which this script can be run. The simplest is simply to specify it in the "+X" option of a FunnelWeb invocation. FunnelWeb shellscripts default to "<current_directory>" and ".fws".
The second alternative is to enter interactive mode.
From there, you can execute the script using:
Interactive mode could be very useful to those with multiple-window workstations. The user could create a window containing an interactive session of FunnelWeb, and then switch between windows, editing, and executing FunnelWeb proper and other programs.
If you find yourself using the command interpreter a lot, be sure to read about the other commands that are available in the FunnelWeb Reference Manual.
Webmaster Copyright © Ross N. Williams 1992,1999. All rights reserved.