System Debug Reference Manual (32650-90888)
Chapter 10 367
System Debug Standard Functions
func bound
COMMAND A command name
WINDOW_COMMAND A window command name
UNDEFINED No definition is currently bound
The table is searched in order from top to bottom. The first type which matches is
returned. Additional matches may be possible but are not tested.
Formal Declaration
bound:str (
operand
:str)
Parameters
operand
A string expression naming the
operand
for which the definition type is
returned.
Examples
$nmdebug > if bound('list') <> 'VAR' then var list slowbuildlist('ALL')
BOUND is often used to determine if a particular variable has been defined. In this example,
which might typically be found in a macro, BOUND is used to test for the prior definition of
the variable named "list". If the variable has not yet been defined, then it is created and
assigned the return value from the macro named slowbuildlist.
$nmdebug > wl bound('123')
NUMBER
$nmdebug > wl bound('add')
NUMBER
123 and ADD are both numbers (in the current input base).
$nmdebug > wl bound('s')
ENV
S is an environment variable (the CM S register). Note that S is also a command name
(Single Step), but only the first match is returned.
$nmdebug > wl bound('BOUND')
FUNC
BOUND is a function (in fact, the one this page is describing).
$nmdebug > wl bound('slowbuildlist')
MACRO
SLOWBUILDLIST is a user defined macro.
$nmdebug > wl bound('12w')
UNDEFINED
12w is undefined. No existing definition for 12w could be located.
Limitations, Restrictions
none