Chapter Contents

Previous

Next
Command Directory

whatis

Display Type Information

ABBREVIATION
wha{tis}

FORMATS
Format 1: whatis EXPRESSION
Format 2: whatis (TAG)

DESCRIPTION
The whatis command prints the type information associated with the argument.

Format 1: Format 1 prints the type information for the EXPRESSION identifier. The type information includes the type and the length of the expression. EXPRESSION can be any valid expression or a macro. Unlike the other debugger commands that support EXPRESSIONs, the whatis command always substitutes the replacement text of a macro, regardless of the setting of the auto cmacros keyword.

Format 2: Format 2 prints the type information for a structure, union, or enum tag or type defined with a typedef . The type information includes the definition of the structure, union, enum or typedef , and the length of the expression.

As Format 2 shows, if the operand of the whatis begins with a left parenthesis, the debugger assumes that a TAG follows. An expression can begin with a left parenthesis if it is escaped. To escape, precede the expression with a backslash.

EXAMPLES
Assume the following declarations when reading Examples and Results Using the whatis Command:
   struct XYZ {
      int arr[10] [5] ;
      double d;
      char *buf;
      } my_struct;

   struct XYZ *xptr;
   int numx;
The whatis command can be used to examine the types of class members by using the C++ binary operator :: . For example:
whatis my_struct::member_name

Examples and Results Using the whatis Command
Example Printed Result
whatis numx
auto at 0p12345678 (4 bytes)
int
whatis \(numx)
auto at 0p12345678 (4 bytes)
int
whatis &numx
int *
whatis (XYZ)
struct XYZ {(212 bytes)
int arr[10][5];
double d;
char *buf;
};
whatis xptr
auto at 0p12345678 
(pointer to 212-byte object)
struct XYZ *
whatis my_struct::d
double d

SYSTEM DEPENDENCIES
none

COMMAND CAN BE ISSUED FROM

PROFILE no
configuration file no
Source window prefix none

SCOPE
The whatis command uses command scope to resolve references to all identifiers.

RETURN CODES SET
Successful: 0
Unsuccessful: 1


Chapter Contents

Previous

Next

Top of Page

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