Chapter Contents

Previous

Next
Command Directory

define

Define a Debugger Macro

ABBREVIATION
de{fine}

FORMATS
Format 1: define DMACRO REPLACEMENT TEXT
Format 2: define DMACRO
Format 3: define *

DESCRIPTION
The define command defines debugger macros, which you should not confuse with macros that are defined in a program with the preprocessor #define statement. Debugger macros are a way of defining a shorthand version for commands or portions of a command that you plan to use often in a debugger session. SAS/C Debugger macros are invoked by prefixing the macro name with #.

Format 1: Format 1 defines a debugger macro (DMACRO) that can be any valid identifier. The REPLACEMENT TEXT, to be used when invoked, is also specified.

Format 2: Format 2 lists the replacement text for DMACRO.

Format 3: Format 3 lists all debugger macros that you have defined. Format 2 and Format 3 are helpful if you need to view your macro definitions.

Macro definitions can be dropped using the undef command. A macro can be redefined by issuing another define for the same macro, but with new substitution text. You do not need to use the undef command on a macro before redefining it.

Debugger macros cannot appear in the following commands:

EXAMPLES

define pt print ptr --> token
defines pt to be a debugger macro so that typing # pt at the Cdebug prompt is equivalent to typing print --> token.

Note:    You also can type # pt.shrt to obtain print ptr --> token.shrt or # pt.lng to obtain print ptr --> token.lng.  [cautionend]

define pt
displays the text that pt replaces.

define *
displays all the debugger macros that you defined.

SYSTEM DEPENDENCIES
none

COMMAND CAN BE ISSUED FROM

PROFILE yes
configuration file no
Source window prefix none

SCOPE
The define command is not affected by changes in scope.

RETURN CODES SET
Successful: 0
Unsuccessful: 1

SEE ALSO
undef


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.