Compaq AAQ2G1FTK Marine Radio User Manual


 
Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and Migration
B.3 Command-Line Qualiers (Options or Flags)
When you specify /STANDARD=OPENVMS_AXP, the Compaq COBOL for
OpenVMS VAX compiler generates informational messages to alert you to
language constructs that are not available in Compaq COBOL. (You must also
specify /WARNINGS=ALL or /WARNINGS=INFORMATIONAL to receive these
messages.) You can use this information to modify your program before using
Compaq COBOL.
Specify /STANDARD=NOOPENVMS_AXP, which is the default, to suppress these
informational messages.
B.4 Compaq COBOL and Compaq COBOL for OpenVMS VAX
Behavior Differences
This section describes behavior differences between Compaq COBOL for
OpenVMS VAX and Compaq COBOL.
B.4.1 Program Structure Messages
In some cases, the Compaq COBOL compiler (whether on the OpenVMS Alpha,
Windows NT, or the Tru64 UNIX system) generates more complete messages
about unreachable code or other logic errors than does the Compaq COBOL for
OpenVMS VAX compiler.
The following example illustrates a sample program and the messages issued by
the Compaq COBOL compiler:
Source le
IDENTIFICATION DIVISION.
PROGRAM-ID. T1.
ENVIRONMENT DIVISION.
PROCEDURE DIVISION.
P0.
GO TO P1.
P2.
DISPLAY "This is unreachable code".
P1.
STOP RUN.
On OpenVMS VAX systems
$ COBOL /ANSI/WARNINGS=ALL T1.COB
$
The program compiles. The Compaq COBOL for OpenVMS VAX compiler
produces no messages.
On OpenVMS Alpha systems
$ COBOL/ANSI/OPTIMIZE/WARNINGS=ALL T1.COB
P2.
.......^
%COBOL-I-UNREACH, code can never be executed at label P2
at line number 7 in file DISK$YOURDISK:[TESTDIR]T1.COB;1
On Tru64 UNIX systems
% cobol -ansi -O -warn all T1.COB
cobol: Info: T1.COB, line 7: code can never be executed at label P2
P2
-------^
B10 Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and Migration