Inspect Manual
Using Inspect With Pascal
Inspect Manual—429164-006
12-9
File Types
Examples
This example assume these Pascal declarations:
TYPE
fruit_type = (apples, oranges, bananas)
VAR fruit : fruit_type
When you use an identifier of enumerated type in a DISPLAY command, Inspect
displays the enumeration value as declared in the TYPE declaration. If you want
Inspect to display the ordinal representation, specify a numeric format along with the
identifier:
-PASOBJ-DISPLAY fruit
FRUIT = ORANGES
-PASOBJ-DISPLAY fruit IN DECIMAL
FRUIT = 1
You can modify a variable of an enumerated type using an enumeration value or an
ordinal value:
-PASOBJ-MODIFY fruit = apples
-PASOBJ-MODIFY fruit = 0
The INFO IDENTIFIER command gives this information:
-PASOBJ-INFO IDENTIFIER fruit
FRUIT: VARIABLE
storage^info:
TYPE=DEFINED TYPE, ELEMENT LEN=8 BITS, UNIT SIZE=1 ELEMENTS
access^info:
#GLOBAL+1 WORDS
structure^info:
CHILD= FRUIT_TYPE-PASOBJ-INFO IDENTIFIER fruit_type
FRUIT_TYPE: DEFINED TYPE
access^info:
TYPE= ENUMERATION
-PASOBJ-INFO IDENTIFIER oranges
ORANGES: NAMED CONST
storage^info:
TYPE=BIN SIGN, ELEMENT LEN=16 BITS, UNIT SIZE=1 ELEMENTS
access^info:VALUE= 1
File Types
Inspect can access file variables; however, Inspect cannot recognize that the variable
actually pertains to a file. Inspect represents a file variable as a 16bit unsigned integer.
Pointer Types
Inspect supports variables of pointer types. Inspect also supports dereferencing of
pointer variables using the circumflex (^) operator.