To Call A Macro From Within An Expression; To Call A Macro From Within A Macro - HP 68000 Series User Manual

Debugger/simulator
Table of Contents

Advertisement

To call a macro from within an expression

• Enter a macro call as part of any expression entered on the command line of
the debugger.
The debugger will evaluate the macro and use its return value when evaluating
the rest of the expression.
Example
If you have the following macro definition:
Debugger Macro Add int power(x,y)
int
int
{
}
.
The command:
Expression Display_Value 33.3 + power(2,3)
will call and evaluate the macro, displaying the value 41.3 in the debugger's
journal window.

To call a macro from within a macro

• You can call a macro from within a macro when they are part of an expression.
The following restrictions apply to calling macros from within a macro:
x;
y;
int
i;
int multiplier;
/* Multiply x by itself y -1 times */
for (i = 1, multiplier = x; i < y;i++)
x *= multiplier;
/* Return x ^y */
return x;
The macro called must have been previously defined.
Chapter 6: Using Macros and Command Files
/* Loop counter */
/* Value x is multiplied by */
Using Macros
197

Advertisement

Table of Contents
loading

This manual is also suitable for:

B1466

Table of Contents