Inspect Manual

Using Inspect With Pascal
Inspect Manual429164-006
12-12
Set Types
This example shows explicit name qualification. Inspect follows the path given in the
data location. The element can then be processed and displayed:
-PASOBJ-DISPLAY football.d_backFOOTBALL.D_BACK =
LINEBACKER
Examples Using a Free TypeUnion
This example shows implicit and explicit qualification of a free type-union, assuming
this Pascal program fragment:
TYPE
thingtype = (int,re,bool);
thing = RECORD
CASE thingtype OF
int : (intval : integer);
re : (reval : real);
bool: (boolval: boolean)
END;
VAR
something : thing;
This example displays the entire record. Inspect cannot know what path to take, so it
displays all paths:
-PASOBJ-DISPLAY something
SOMETHING.INTVAL = value displayed as an integer
SOMETHING.REVAL = value displayed as a real
SOMETHING.BOOLVAL = value displayed as a boolean
This example specifies an explicit path. Inspect takes this particular path to the
variable:
-PASOBJ-DISPLAY something.boolval
SOMETHING.BOOLVAL = value displayed as a boolean
Set Types
Inspect allows you to use the INFO IDENTIFIER, BREAK, and DISPLAY commands
with set variables.
Examples
This example assume these Pascal declarations:
TYPE
colorset = (red,white,blue,yellow);
colors = SET OF colorset;
VAR
flag : colors;
BEGIN