System Debug Reference Manual (32650-90888)
44 Chapter2
User Interface
Command Line Substitutions
chapter introduced all the possibilities for operand tokens in expressions, thereby
answering the question, "What sorts of things can be used as operands?" This section deals
with the converse: "Given an operand, what sort of thing is it?"
The process of evaluating an operand token can be modeled by a list of possible
interpretations of a token. The unknown token is tested against each of the possibilities in
the list, in the specified order, with the first match determining the token's meaning.
The following list determines the interpretation of an operand token:
1. Test for a string literal or a numeric literal in the current input base.
2. Test for a predefined variable.
3. Test for a user-defined variable.
4. Test for a predefined function.
5. Test for a macro.
6. Test for a procedure name symbol in the current mode, subject to the search path in
effect.
7. If still unresolved, fail.
There are two operand modifiers that, when prefixed to an operand, alter the above search
order for that operand. The exclamation point (!) signals that the operand to which it is
prefixed is not to be treated as a numeric literal. This prevents the token from being
mistaken as a hex constant and initiates the operand search at step 2.
A question mark prefix (?) indicates that the operand is to be treated as a procedure name
symbol and that the entry point or export stub address of the named procedure is being
referenced instead of its starting address. The search for such symbols begins with step 6.
Command Line Substitutions
Command line scanning proceeds from left to right and is done in two phases. The first
preprocessing phase scans a command line for the vertical bar character (|), which
introduces the following syntax:
|
expression
[:
fmtspec
][~]
When the command preprocessor recognizes the above syntax, it removes all the
characters associated with it from the command line and replaces them with text
representing the value of the expression. The
expression
part of the substitution syntax
may be any valid expression as previously described in this manual. In particular, there
are no special restrictions placed on command line substitution expressions.
The optional :
fmtspec
represents special formatting directives that may be used to control
the formatting of the value of the expression when it is converted to characters and
inserted back into the command line.
Fmtspec
is always specified as a string literal and is