Commands

Commands given from the tty, the graphics, a macro or a command file are processed before interpretation. This processing involves the following steps in the order given:

  1. history substitution mechanism
  2. removal of double-quotes around strings
  3. query and variable substitution
  4. AL procedure invokation
  5. macro invokation

History

The command HISTORY outputs the list of the 19 previous commands. It is possible to use one of these commands again, without having to type in the command again using the history mechanism. This is similar to the history mechanism in the UNIX C-shell, although more primitive.

To repeat the previous command, give the single character '^' as command:

ANSIG> ^
If a number follows the '^' character, then the command with that order number will be used.

If the characters following the '^' character are not digits, then ANSIG attempts to find a previous command which starts with the same characters.

It is possible to repeat the previous command with a string substituted by another. Give the string to replace between two '^' characters, followed by the string to put in instead. An example:

ANSIG> echo old command
old command

ANSIG> ^old^new
echo new command
new command

Queries

A query is a way for a command in a macro to obtain a value from the user. When a query is encountered by the ANSIG program during execution of a macro, a prompt is output and the program waits for an answer from the user.

The query item begins with a '?' character, and what follows after it is used as the prompt. The answer given by the user is put into the line instead of the '?' character and prompt text.

In tty mode, the user gives the answer directly to the prompted question via the keyboard. In graphics input mode, the user usually gives the answer by picking some item in the graphics menu window (for example a command word, or a sequence residue) or a crosspeak in the graphics window. Another possibility is to type in the answer directly from the keyboard. The text will appear in yellow after the prompt text in the graphics menu window.


Per Kraulis 10 Apr 1996.