Inspect Manual

Using Inspect With TAL and pTAL
Inspect Manual429164-006
13-9
Usage Considerations
Usage Considerations
Operator precedence is the same as the precedence defined for TAL and pTAL.
To refer to the contents of the pointer named XX, use the expression (@XX). To
refer to the contents of the indirect variable to which XX points, use XX.
Inspect does not support the IF or CASE constructions in expressions; for
example, these two Inspect commands are invalid:
-TALPGM-MODIFY x := IF y>5 THEN 12 ELSE 24
-TALPGM-MODIFY x := CASE r OF BEGIN y; y*y; y*y*y; OTHERWISE z; END
TAL and pTAL Data Types and Inspect
The following subsections discuss how Inspect handles and presents various TAL and
pTAL data types.
Arrays
Inspect supports all TAL and pTAL array types, including arrays of structures. You can
use a single element, a group of elements, or an entire array as the data-reference
part of a data location:
Examples
This example assumes the TAL declaration:
INT d^array [0:9]
Here are the attributes of the array:
-TALOBJ-INFO IDENTIFIER d^array
D^ARRAY: VARIABLE
storage^info:
TYPE=BIN SIGN, ELEMENT LEN=16 BITS, UNIT SIZE=1 ELEMENTS
primary: one of
data-location
.data-location
@data-location
number
(expression)
Data Reference Example Where Valid
Single element MYARRAY[5] In any Inspect command
Range of elements MYARRAY[1:7] In any Inspect command except BREAK
Entire array MYARRAY In the INFO IDENTIFIER and DISPLAY commands
only