Transact Compiler Listings [ HP Transact Reference Manual ] MPE/iX 5.0 Documentation
HP Transact Reference Manual
Transact Compiler Listings
The following example shows the listing of a source program produced by
the compiler using all four default control options. The three columns
of numbers on the left side of the listing are described below.
COMPILING WITH OPTIONS: LIST,CODE,DICT,ERRS
Line Number
downarrow Internal Location
downarrow downarrow Nesting Level
downarrow downarrow downarrow
1.000 downarrow downarrow SYSTEM COMPIL;
2.000 0000 downarrow IF (A) = (B)
3.000 0000 1 THEN DO
4.000 0000 1 DISPLAY "DUPLICATE ENTRY";
5.000 0005 1 IF (A) = (C)
6.000 0005 2 THEN IF (D) < 50
7.000 0008 2 THEN MOVE (A) = (D);
8.000 0013 1 DOEND;
9.000 0013 END;
CODE FILE STATUS: NEW
0 COMPILATION ERRORS
PROCESSOR TIME=00:00:01
ELAPSED TIME=00:00:03
Line Number Line number from the source listing.
Internal Location Internal location reference number of the statement
on the associated text line. These numbers are
useful when TEST mode is used during execution. (See
Chapter 10.)
Nesting Level Nesting level indicator that is incremented by one
when the compiler encounters the start of a compound
statement or a new level. It is decremented by one
when the compiler reaches the end of such a compound
statement or level.
The nesting level number changes at the line after the IF statement that
introduces a new level. If you have trouble tracking level numbers, it
helps to include DO/DOEND pairs at every level change, even though they
are only required if you have compound statements. The following example
shows how DO/DOEND pairs clarify the structure of a program:
COMPILING WITH OPTIONS: LIST,CODE,DICT,ERRS
1.000
2.000 SYSTEM TST04;
3.000 0000 DEFINE(ITEM) TEMP01 I(2):
4.000 0000 TEMP02 I(2):
5.000 0000 TEMP03 I(2);
6.000 0000 PROMPT TEMP01:TEMP02:TEMP03;
7.000 0003 IF (TEMP01) = 1 THEN
8.000 0003 1 DO
9.000 0003 1 IF (TEMP02) = 1 THEN
10.000 0006 2 DO
11.000 0006 2 IF (TEMP03) = 1 THEN
12.000 0009 3 GO TO OUT
13.000 0009 3 ELSE
14.000 0012 3 DO
15.000 0012 3 DISPLAY "AT LEVEL 3";
16.000 0014 3 LET (TEMP01) = 3;
17.000 0016 3 DOEND;
18.000 0016 2 DOEND;
19.000 0016 1 DOEND;
20.000 0016 IF (TEMP01) = 3 THEN
21.000 0016 1 DO
22.000 0016 1 DISPLAY "AT SECOND LEVEL 1"
23.000 0019 1 DOEND;
24.000 0021
25.000 0021 OUT:
26.000 0021 DISPLAY "AT THE END";
27.000 0023 EXIT;
CODE FILE STATUS: REPLACED
0 COMPILATION ERRORS
PROCESSOR TIME=00:00:02
ELAPSED TIME=00:00:03
Transact Compiler Listings
The compiler listing generated by the Transact/iX and Transact/V
compilers are the same with two exceptions:
* Transact/iX does not create a permanent p-code file and hence the
compiler listing does not report the "CODE FILE STATUS".
* The summation of compiler warnings is provided with Transact/iX
and the warning/error/compilation time message is formatted
differently.
MPE/iX 5.0 Documentation