Prism 6.0 Reference Manual

whatis

Displays the declaration of a name.

SYNTAX

whatis [struct] name [pset set_name | set_definition]

DESCRIPTION

Use the whatis command to display information known by Prism about a specified name in the program.

Prism displays type information using the syntax of the source language (the language of the definition, not the declaration). In programs written in a mixture of Fortran and C, Prism displays each declaration in the appropriate language.

When the struct keyword is present, Prism treats name as a type name. The struct keyword resolves ambiguities where there are types and variables with the same name.

When issued in MP Prism, this command can take a pset qualifier. If used with a qualifier, it applies to the pset you specify. If used without a qualifier, it applies to the current pset. See " Using Pset Qualifiers" for more information on pset qualifiers.

EXAMPLE

The default attribute is variable:

(prism) whatis NameName *Name;

Use the 'struct' keyword to ask about a type. In this example there are two types spelled Name. One Name is a typedef:

(prism) whatis struct Name 
     #More than one identifier 'Name'.
Select one of the following names:
0) Cancel
1) `a.out`whatis.c`struct Name
2) `a.out`whatis.c`Name
> 2
typedef struct Name  Name;

The other Name is a struct:

(prism) whatis struct Name
More than one identifier 'Name'.
Select one of the following names:
0) Cancel
1) `a.out`whatis.c`struct Name
2) `a.out`whatis.c`Name
> 1 
struct Name {
char last[50];
char first[40];
char middle;
struct Name *next;
};