home *** CD-ROM | disk | FTP | other *** search
- ;
- VALIAS.COM
-
- Size (recs) CRC Version Author/Latest Issue Disk
- 7k (49) B204 0.2b Jay Sage Z3COM10
-
- 1- Syntax 2- Recursive Aliases 3- Commands
-
- VALIAS is a program for creating new and editing existing alias program
- files. It uses the full-screen capabilities provided by the Z3 TCAP (terminal
- capability) facility to make it much easier to create and edit alias scripts.
- Support for clear screen, clear-to-end-of-line, and cursor addressing is
- required.
-
- Once VALIAS is running, it presents prompts to the user at the bottom of
- the screen and status information at the top of the screen, including the
- program name VALIAS and the version number, the alias mode, and the default
- alias file name in use. The middle 20 lines of the screen show the individual
- commands of a prototype command line.
- :1
-
- Syntax: VALIAS [[DIR:]FILENAME]
-
- If VALIAS is invoked with a file name specified, a file of that name and
- type COM will be read in if it exists and if it is an alias file. If such a
- file does not exist or is not an alias file, then the specified name will be
- used as the default output file for the creation of a new alias. An optional
- directory in either DU or DIR form may be specified. If a file type is
- included with the name, it will be ignored and replaced by COM. If the file
- name is ambiguous, VALIAS will use the first matching file found.
-
- The user may enter lines with leading blanks to make the alias easier to
- read (especially useful for keeping IF levels straight) and may put multiple
- commands separated by semicolons on a single line. When the alias file is
- created, leading blanks are removed and the lines are concatenated into a
- single multiple command line. The VALIAS Format command (see below) will do
- this and then redisplay the commands one per line. If there are more than 20
- commands, the 20th line will include the excess commands.
- :2
-
- Recursive Aliases:
-
- With VALIAS a new type of alias file has been introduced. A normal alias
- expands the prototype command line stored in it by performing parameter
- substitution. It then appends any commands in the multiple command line
- buffer that appear after the alias invocation and writes the result into the
- command line buffer. The type of alias called recursive in VALIAS performs
- the same command line expansion, but it flushes any other commands that were
- in the command line buffer. This is useful when an alias calls itself or
- another alias recursively so that commands that were not needed do not build
- up in the command line after the alias and result in an overflow error.
-
-
- Consider the schematic alias WORK with the following command sequence:
-
- EDIT $1.MAC
- ASSEMBLE $1
- IF ERROR
- WORK $1
- ELSE
- LINK $1
- FI
-
- If the edited file assembles with no errors, the sequence flows through
- directly. If assembly errors do occur, however, the alias is reinvoked. A
- normal alias would still append the expansion of "ELSE;LINK $1;FI" to the
- newly invoked alias. Every cycle would add another copy of these commands.
- Not only might these superfluous commands cause a command line overflow error,
- but their execution would not even be wanted. The recursive type alias solves
- this problem.
-
-
-
- For the technically curious, recursive aliases are implemented as follows.
- The file VALIAS1.COM into which the prototype command line is placed to form
- the alias contains a flag near the beginning of the code (just before the
- label START) that determines whether the command line will be flushed later.
- A byte with an 'F' precedes this flag to identify the alias as one of the new
- type. When VALIAS reads in an existing alias for editing, it can determine
- whether it is of the new (VALIAS1) or old (ALIAS1) type, and if it is of the
- new type it determines the mode (normal or recursive) and sets the VALIAS flag
- to match. Old type aliases default to normal type.
- :3
-
- VALIAS Commands:
-
-
- The main VALIAS command prompt at the bottom of the screen waits for the
- user to press one of the following keys and then performs the corresponding
- function.
-
-
- VALIAS Commands: C
-
- Clear all commands and begin entry of new commands at line A in insert
- mode. The default alias name is not changed.
-
-
- VALIAS Commands: D
-
- Delete a line in the alias. The user will be prompted for the name of the
- line to delete (A-T). A carriage return or control- c will cancel the
- operation; entering a letter between A and T in upper or lower case will
- remove that line and close up the space; any other response will be ignored.
-
-
-
- VALIAS Commands: F
-
- Format the command lines, removing leading spaces on each line and empty
- lines between commands and redisplaying the commands one per line.
-
-
- VALIAS Commands: H
-
- Help information is displayed at the lower right portion of the screen if
- VALIAS was assembled with the HCMDFL (help command flag) set to yes. We
- recommend not including this command because it pushes VALIAS over the 6K
- boundary and because the commands are self-explanatory once they have been
- learned. We included this command mainly for the beta-test versions, which
- were distributed without a DOC file.
-
-
- VALIAS Commands: I
-
- Insert new command lines. This command prompts the user for the command
- line BEFORE WHICH to begin inserting additional commands. After the user
- answers the prompt as with the D command, a blank line is opened up for the
- insertion at the indicated location and the cursor is placed there. After the
- new command is ended with a carriage return, another blank line after the one
- just entered is opened. This process continues until an empty line is entered
- or until the last or next to last line is reached. Then the extra open line
- is closed and the user is returned to the command prompt. Existing contiguous
- commands on lines above the insertion line are pushed up by one line after
- each insertion. To prevent losing the last line, VALIAS won't automatically
- advance to the last line unless that line is currently empty (if you specify
- the last line for an insert, the last line will be lost). Note that commands
- do not have to be on contiguous lines; empty lines may exist between filled
- lines. When the alias file is created, these blank lines will be closed up
- automatically. We encourage you to leave blank lines to make the structure of
- the alias clearer during creation.
-
-
- VALIAS Commands: L
-
- Load an existing alias from disk or establish a new default name. The user
- will be prompted for the name of the alias file. If a default name is in
- effect as a result of a previous load or save command or as a result of a file
- name included when VALIAS was invoked, then entering a carriage return will
- select this name. A new name with an optional directory specification of the
- DU or DIR form may be given. To cancel the load command, enter a control-A
- and a carriage return. If a file type is specified, it will be ignored; if an
- ambiguous file name is given, the matching directory entry will be used. Once
- a file has been specified, the commands will be cleared and VALIAS will try to
- load the specified file. The load is performed exactly as with a name
- specified on the command line when VALIAS was invoked (the same code is used).
-
-
- VALIAS Commands: M
-
- Mode selection. This command sets the mode to create a normal or a
- recursive type alias file. See the discussion of recursive aliases above. A
- mode remains in effect until changed by the M command or by the loading of a
- new file. The default mode is normal.
-
-
- VALIAS Commands: R
-
- Replace a command. The user will be prompted for a line to work on as with
- the D command. When a valid line has been selected, the existing command
- there (if any) is deleted, and the cursor is placed on the line to allow the
- user to enter a replacement command. Note that the replacement command may
- consist of several commands separated by semicolons (no semicolon at the very
- end, however). Also note that the replacement can be done at any line, not
- only where a command existed previously or next to one. Isolated lines can be
- entered at any line.
-
-
- VALIAS Commands: S
-
- Save the commands into an alias file. The user will be prompted for the
- name of the alias file. If a default name is in effect as a result of a
- previous load or save command or as a result of a file name included when
- VALIAS was invoked, then entering a carriage return will select this name. A
- new name with an optional directory specification of the DU or DIR form may be
- given. To cancel the save command, enter a control-A and a carriage return.
- If a file type is specified, it will be ignored; if an ambiguous file name is
- given, the bell will ring and the prompt will be repeated. If a file of the
- given name exists, the user will be asked if it should be overwritten. When
- the S command is completed, the user returns to command mode to allow further
- editing of the commands. In this way multiple aliases can be created and
- edited in a single session.
-
-
- VALIAS Commands: X
-
-
- eXit from VALIAS. This command or control-c entered in response to the
- main command prompt of VALIAS will terminate the session and return to ZCPR3.
- thσ Mos⌠ Significan⌠ Bi⌠ oµá al∞ ì
- bytes¼ s∩ editor≤ likσ WordStar¼ whicΦ occasionall∙ se⌠ th