Inspect Manual
Using Inspect With FORTRAN
Inspect Manual—429164-006
11-7
Examples
Subscripting data locations in Inspect is the same as in FORTRAN. For example,
this DDL structure requires three subscripts when you refer to the data item
SUBFIELD:
RECORD REC.
03 SUBREC OCCURS ...
05 FIELD OCCURS ...
07 SUBFIELD OCCURS ...
A data reference to SUBFIELD must include subscripts for all of its parent data
items:
REC^SUBREC(X)^FIELD(Y)^SUBFIELD(Z)
Statement functions are treated as subprocedures. Suppose, for example, there is
an identifier POMME local to a statement function, and the program unit that
contains the statement function also contains an identifier named POMME.
Inspect provides no way for the user to qualify a mention of POMME (such as for
DISPLAY or for setting a data breakpoint).
Examples
This example assume the FORTRAN program fragment in a subroutine named
LOSSES:
COMMON /TALLIES/ COLLAPSE, OSCILLATE
...
THRESHOLD(I) = MIN (I*1.E-2, X(I,1))
...
DO 120 I = 1, 26
DO 110 J = 1, 26
100 MARGIN (I) = MARGIN (I) - X(I,J)
IF ( MARGIN (I) .LT. THRESHOLD (Z) ) THEN
MARGIN (I) = 0
COLLAPSE = COLLAPSE + 1
END IF
110 CONTINUE
120 CONTINUE
Here are some data locations:
Data Location Specifies
#LOSSES.J The loop variable J.
#LOSSES.I The loop variable I, not the variable I in the statement function
THRESHOLD. To refer to a variable in a statement function, you must
find its address with the INFO IDENTIFIER command and use low-
level mode to display or modify it.