[an error occurred while processing this directive]
HP OpenVMS Systems Documentation |
HP Pascal for OpenVMS
|
Previous | Contents | Index |
By using the \' single-quote escape character, you can insert adjacent single quotes without DCL interpreting it as a symbol substitution, as shown in the following example:
$ PASCAL/CONSTANT=MSG="String with 2 \'\' single quote characters" |
Do not use \" to insert a double-quote character into the string literal, as DCL will interpret the double quote as the end of the string. Instead, use the \x22 character literal (16#22 is the ASCII code for the double-quote character) to insert a double-quote character into the string literal without DCL interpreting it as the end of the string. This is shown in the following example:
$ PASCAL/CONSTANT=MSG="String with a \x22 double-quote character" |
To use a single-quote string literal with /CONSTANT, enclose the entire name=value clause in double quotes to prevent DCL from trying to perform symbol substitution when it sees the single-quote character. For example:
$ PASCAL/CONSTANT="MSG='Single-quoted literal'" |
In this case, the double quotes are discarded by the compiler, and the single-quoted string literal is processed. However, using double-quoted literals with /CONSTANT is easier and more flexible.
The extended-string syntax for string literals is not supported on the command line. The extended-string syntax is as follows:
{'printing-string'({constant-expression},...)}... {"printing-string"({constant-expression},...)}... |
These extended-string literals are constant expressions, not simple literals.
To insert nonprintable characters into a string literal from the command line, you can use a double-quoted string literal and the \xnn escape sequence.
Table 1-4 lists the available options, their corresponding actions, and their negations.
Option | Action | Negation |
---|---|---|
ALL | Specifies that the compiler should include symbol and traceback information in the object module. | NONE |
SYMBOLS | Specifies that the compiler should include in the object module symbol definitions for all identifiers in the compilation. | NOSYMBOLS |
TRACEBACK | Specifies that the compiler should include in the object module traceback information permitting virtual addresses to be translated into source program routine names and compiler-generated line numbers. | NOTRACEBACK |
When debugging programs that contain schema, you must use the /NOOPTIMIZE qualifier on the PASCAL DCL command. If you do not use /NOOPTIMIZE, you might receive incorrect debug information or an Internal Debug Error when manipulating schema.
When you specify SYMBOLS without TRACEBACK, the table of compiler-generated line numbers is omitted from the debugger symbol table.
You should consider using /NOOPTIMIZE when you are using /DEBUG. Allowing optimizations to occur can make debugging difficult and can obscure some sections of the compilation unit.
The /DEBUG qualifier without options is equivalent to /DEBUG=ALL. The negation /NODEBUG is equivalent to /DEBUG=NONE.
Option | Action | Negation |
---|---|---|
PLACEHOLDERS | Directs the compiler to accept placeholders as valid program elements. | NOPLACEHOLDERS |
COMMENTS (OpenVMS VAX systems) | Directs the compiler to recognize design comments. | NOCOMMENTS |
The /DESIGN qualifier without an option is equivalent to /DESIGN=(PLACEHOLDERS) on OpenVMS I64 and OpenVMS Alpha systems and /DESIGN=(PLACEHOLDERS, COMMENTS) on OpenVMS VAX systems.
Option | Action | Default Information |
---|---|---|
BYTE | Allocates unpacked enumerated data types with up to 255 elements in a single byte. Otherwise, enumerated data types are allocated in a 16-bit word. | Default on OpenVMS VAX systems. |
LONG | Allocates all unpacked enumerated data types in a 32-bit longword. | Default on OpenVMS I64 and OpenVMS Alpha systems. |
The /ENVIRONMENT qualifier on the command line overrides the ENVIRONMENT attribute in the source program or module. By default, the attributes of the source program or module determine whether an environment file is created; however, if the /ENVIRONMENT qualifier is specified at compile time, an environment file will always be created.
If the source program includes the [NO]G_FLOATING attribute, then the value of the /FLOAT qualifier must be in agreement with the value of the attribute.
Option | Action | Default Information |
---|---|---|
D_FLOAT | REAL data type will be defined in the F_floating-point format; DOUBLE will be defined in the D_floating-point format. |
Default for OpenVMS VAX systems if /FLOAT or
/NOG_FLOATING is not specified. |
G_FLOAT | REAL data type will be defined in the F_floating-point format; DOUBLE will be defined in the G_floating-point format. |
Default for OpenVMS Alpha systems if /FLOAT or
/NOG_FLOATING is not specified. |
IEEE_FLOAT | REAL data type is defined in the IEEE S floating-point format; DOUBLE is defined in the IEEE T floating-point format. |
Default for OpenVMS I64 systems if /FLOAT or
/NOG_FLOATING is not specified. |
OpenVMS VAX systems do not support /FLOAT=IEEE_FLOAT.
On newer Alpha systems, the architecture has additional instructions that can modify byte and word-sized data directly. See the /ARCHITECTURE qualifier for additional information.
On OpenVMS I64 systems, the compiler may use quadword instructions to update unaligned variables unless modified by use of the /GRANULARITY qualifier.
The qualifier takes a list of directories to search. The compiler applies the /INCLUDE information to the following Pascal constructs:
The compiler searches as follows:
Table 1-8 lists the available options, their corresponding actions, and their negations.
Option | Action | Negation | |
---|---|---|---|
ALL | Enables all optimization components. | NONE | |
INLINE= keyword | Enables inline expansion of user-defined routines. | NOINLINE | |
LEVEL= num | Controls the optimization level (OpenVMS I64 and OpenVMS Alpha systems only). Values for num are: | ||
0 | Disables all optimizations. Identical in function to /NOOPTIMIZE. | ||
1 | Enables local optimizations and recognition of common subexpressions. | ||
2 | Enables all level 1 optimizations and some global optimizations, including the following: code motion, strength reduction and test replacement, split lifetime analysis, and code scheduling. | ||
3 |
Enables all level 2 optimizations and some additional global
optimizations that improve speed at the cost of extra code size. These
optimizations include integer multiplication and division expansion
(using shifts), loop unrolling, and code replication to eliminate
branches.
Identical in function to
|
||
4 | Enables all level 3 optimizations and inline expansion of procedures and functions. Identical in function to /OPTIMIZE. | ||
5 | Enables software pipelining and additional software dependancy analysis, which in certain cases improves run-time performance. | ||
UNROLL= num | Controls number of times loops are unrolled. The default is 4. /UNROLL=0 disables loop unrolling. Loop unrolling is only enabled above optimzation level 2. (OpenVMS I64 and OpenVMS Alpha systems only.) | ||
TUNE= processor | Tune the object code to run best on the processor chosen. The default is Generic. Values for the processor are EV4, EV5, EV56, EV6, EV7, EV67, EV68, Generic, and Host. (OpenVMS Alpha systems only.) |
The /OPTIMIZE qualifier without options is equivalent to /OPTIMIZE=ALL. The negation /NOOPTIMIZE is equivalent to /OPTIMIZE=NONE.
The OPTIMIZE and NOOPTIMIZE attributes in the source program or module override the /OPTIMIZE and /NOOPTIMIZE qualifiers on the command line.
The /NOOPTIMIZE qualifier guarantees full evaluation of both operands of the AND and OR Boolean operators to aid in diagnosing all potential programming errors. If you wish to have short-circuit evaluation even with the /NOOPTIMIZE qualifier, use the AND_THEN and OR_ELSE Boolean operators.
On OpenVMS I64 and OpenVMS Alpha systems, you can also specify an optimization level. Optimization levels from level 2 and higher include all optimizations from lower levels.
Option | Action |
---|---|
COMMON | Displays informational messages for all platforms. |
OpenVMS_I64 | Displays informational messages for the OpenVMS I64 platform. |
OpenVMS_Alpha | Displays informational messages for the OpenVMS Alpha platform. |
OpenVMS_VAX | Displays informational messages for the OpenVMS VAX platform. |