Inspect Manual

Using Inspect With FORTRAN
Inspect Manual429164-006
11-9
Arrays
Arrays
Inspect supports all FORTRAN array types, including multidimensional arrays and
arrays of records. You can use a single element, a group of elements, or an entire
array as the data-reference part of a data location:
If you use the array name only in any command other than INFO IDENTIFIER or
DISPLAY, Inspect displays the error:
Examples
This example assume the FORTRAN declaration:
INTEGER A(10,20)
This example shows the internal attributes of the array:
-FORTOBJ-INFO IDENTIFIER a
A: VARIABLE
storage^info:
TYPE=BIN SIGN, ELEMENT LEN=16 BITS, UNIT SIZE=1 ELEMENTS
access^info:
'L'+2I+%13 WORDS
dimension^info:
[1:10,1:20]
This example displays a single element of the array:
-FORTOBJ-DISPLAY a(2,2)
A[2,2] = 202
This example displays a range of elements:
-FORTOBJ-DISPLAY a(2:6,2)
A[2,2] = 202 302 402 502 602
-FORTOBJ-DISPLAY a(2,2:6)
A[2,2] = 202
A[2,3] = 203
A[2,4] = 204
A[2,5] = 205
A[2,6] = 206
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
** Inspect error 80 ** Required subscript missing: identifier