9.2.5 Syntax Error/Warning Messages

When KAP detects syntax errors, it simply copies the input program unit to the transformed code file with no attempt to optimize the code.

When a program has syntax errors, messages are presented in the source (/listoptions=o ) listing, interspersed with the user's code. Regardless of whether an original listing is requested, stderr: notes syntax errors and warnings. To locate the error messages in the source listing, look for lines beginning with the symbols ### , for example:

Footnotes Actions  DO Loops Line
                            1   SUBROUTINE Z(A, B, N)
                            2   REAL  A(N,N), B(N,N)
                   +--------3   DO 20 I=1,N
                   !+-------4   DO 20 J=1,N
                   !!       5   X = A(I,J)
                   !!       6   Y = B(I,J)
                   !!_______7   20  C(I,J) = X + Y

### line(7)
### error %KAP-E-DO_NON_EXE, DO loop ends on a non-executable statement.
### error %KAP-E-STMT_FUNCTION_O, Array not declared or statement
          function declared after executable statements.
                            8   PRINT *, X
                            9   RETURN
                           10   END

KAP also may intersperse syntax warning messages with the user's code, but optimization proceeds. Syntax warnings are for constructs that are not legal, but whose intent is clear.


Previous Page | Next Page | Contents | Index |
Command-Line Qualifiers