ILE C/C++ Programmer's Guide


Equating a Name with a Variable, Expression, or Debug Command

You can equate a name with a variable, expression, or debug command for shorthand use. You can then use that name alone or within another expression. If you use it within another expression, the value of the name is determined before the expression is evaluated. Equates stay active until a debug session ends or a name is removed.

Example:

This example shows you how to use the Equate debug command with a variable name.

  1. Enter DSPMODSRC. The Display Module Source display is shown.
  2. To equate an expression, enter equate <name> <definition> where <name> is a character string that contains no blanks and <definition> is a character string separated from <name> by at least one blank. The character strings can be in uppercase, lowercase, or mixed case. The length of the character strings combined is limited to 144 characters, which is the length of the command line. After any Equates have been expanded, the length is limited to 150 characters, which is the maximum command length. For example, enter equate dv display variable .

If a definition is not supplied, and a previous Equate debug command has defined the name, the previous definition is removed. If the name was not previously defined, an error message is shown.

To see the Equates that are defined for this debug session, enter: display equate. A list of the active Equates is shown on the Evaluate Expression display.


[ Top of Page | Previous Page | Next Page | Table of Contents ]