Progress
Debugger Guide
MACRO Command
Creates a Debugger macro.
SYNTAX
PARAMETERS
macroname
The name of the new macro. The macro name is case sensitive and cannot specify a Debugger command name.
macro-definition
One or more Debugger commands and user-defined macro names separated by semicolons (;).
NOTES
- If macroname specifies the name of an existing macro, macro-definition redefines the macro.
- When you enter a macro as a command, the macro command (not its definition) is echoed in the command panel.
- You can include single-valued Debugger variables to accept values in a macro definition. The values of these variables are set differently depending on whether you invoke the macro as a command or as part of a button definition. If the macro is invoked as part of a button definition, the variables take their values from the listing panel as defined for button definitions. Otherwise, they take the corresponding values entered on the command line, as listed in Table A–2.
Table A–2: Variables in Macros as Commands Variable Value &FILE A corresponding quoted or unquoted string. &LINE A corresponding numeric value. &TEXT A corresponding quoted or unquoted string.
EXAMPLESThis macro definition executes the BREAK Command using the &FILE and &LINE Debugger variables:
To invoke the stop-at macro as a command, you must specify the macro name followed by a filename and line number:
The stop-at macro expands to this Debugger command:
When you invoke a macro as a command, you can specify only one value for each Debugger variable used, no matter how many times you use it. Thus, you can never specify more than three variable values for a macro command. For example, this macro definition executes the BREAK Command and RUN Command using the &FILE Debugger variable:
To invoke the debug macro, you only have to enter the macro name with one filename parameter:
The debug macro then expands to these Debugger commands:
This macro definition executes the CANCEL BREAK Command using the &TEXT variable. This allows all formats of the CANCEL BREAK Command to be invoked by the macro command:
These commands all show valid uses of the cb macro:
SEE ALSO
BUTTON Command, CANCEL ALL Command, CANCEL MACRO Command, SHOW MACROS Command
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |