October 1, 1979 COMMAND MACROS OVERVIEW AND USE
11 COMMAND MACROS _________________
11.1 OVERVIEW AND USE _____________________
A Command Macro is a series of FRESS commands grouped together
by the user to be invoked with a single command name. Command
macros help to reduce the number of keystrokes needed to perform
standard operations or to make a complicated operation easier.
Command Macros are created (see Section 7.2.1) and then grouped
macro libraries together in ________________ (<maclib>s) (see Section 7.2.2).
FRESS should be invoked as follows to make command macro libraries
available for a given session (see Section 2.1):


FRESS [NOS] [<version>] [<maclib>...]


<maclib>...Up to nine <maclib>s may be specified -- duplicate
macro definitions will be resolved in favor of that
residing in the library specified earliest. The system
macro library will be searched last.
Specification _____________
Command Macros are invoked or "called" much as ordinary
commands are. The differences between the two methods are:
A Command Macro name must be preceded by a period (".") or a
comma (",") to indicate it is a macro. If a comma is used,
each expanded command line is printed at the terminal, preceded
by a colon, before execution. This is useful when "debugging"
a new macro (figuring out why it does not work). If a period
is used the expanded lines are not typed.
first command A Command Macro must be the _____________ on a line and must
not be preceded by any blanks.
If a Command Macro is followed by a command separator and an
ordinary FRESS command, the entire expanded macro will be
executed before the ordinary FRESS command is parsed and
executed.
FRESS Resource Manualnual Release 9.1 Section 7.1 -- 247
October 1, 1979 COMMAND-248-OS OVERVIEW AND USE
Parameters __________
Parameters may be passed to the macro in the same way
parameters are specified in an ordinary FRESS command.
for the Key delimiters are used to separate the parameters _______
macro _____. These delimiters bear no direct relation to the
delimiters used for each line within the macro definition and
need not use the same character.
A parameter is left null by specifying a key delimiter, but no
value for it. For example, to omit the parameter in DELETE,
type "d"; to leave it null, type "d/".
Parameters in excess of those required by the macro are
considered to be part of the last parameter.
only All parameters are required and may ____ be omitted if an
explicit default is given for each occurence of it within the
macro definition.
Errors ______
expansion The following messages indicate macro _________ errors (see
Appendix E.3 for explanations):
INVALID DEFAULT LITERAL
MACRO EXPANSION TOO LONG
MACRO NAME TOO LONG
MACRO NOT FOUND
MISSING SYMBOLIC PARAMETER
&R<n> HAS NOT BEEN DEFINED
If one of the errors above occurs during expansion or execution
of a Command Macro, the relevant error message is typed, the
expansion of the line causing the error is typed, and so is the
message:
COMMAND MACRO: ACCEPT (A) OR REJECT (R) REMAINING FUNCTIONS
A...the execution of the macro will proceed, but the line
containing the error will be skipped
R...(or anything else) expansion and execution of the
macro immediately halts. Remaining functions include
the rest of the Command Macro and any commands that
were on the same line as the macro invocation (after
a command separator).
FRESS Resource Manual Release 9.1
Previous Page Next Page