Inspect Manual
Using Inspect With FORTRAN
Inspect Manual—429164-006
11-4
Examples
Specifying code locations by line number
If no statement begins at the line number you specify, Inspect issues this warning:
Inspect then uses the statement starting at the given line number. If more than one
statement begins on the line you specify, Inspect uses the start of the first
statement.
Specifying statement-number or statement-label.
In order for Inspect to determine if a number given for a code location is a
statement-number or statement-label, the setting of LOCATION FORMAT is used.
The current setting can be checked by using the SHOW LOCATION FORMAT
command. If the LOCATION FORMAT includes STATEMENTS, the number is
interpreted to mean statement-number. If STATEMENTS does not appear in the
LOCATION FORMAT, then the number is interpreted to mean statement-label.
Examples
This example shows the effect of using number with combinations of LOCATION
FORMAT with and without STATEMENT.
When the LOCATION FORMAT includes STATEMENT, the number in the code
location is interpreted to mean statement 20.
-FOROBJ-SET LOCATION FORMAT LINE, STATEMENT
-FOROBJ-SOURCE AT 20
16 #42 ll
= .not. ll 17 #43 goto 25
18 #44 else
19 #45 assign 30 to next
20 #46 goto next
#47 endif
21 #48 goto bad
#49
22 #50
30 assign 50 to next
23 #51 if ( ir .eq. 0 ) then
When the LOCATION FORMAT does not include STATEMENT, the number in the
code location is interpreted to mean label 20.
-FOROBJ-SET LOCATION FORMAT LINE
-FOROBJ-SOURCE AT 20
#36 goto bad
#37 endif
#38 goto bad
#39
#40 20 ll = .false.
#41 25 if ( .not. ll) then
#42 ll = .not. ll
** Inspect error 117 ** A subsequent line number is assumed: line-number