[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

HP Pascal for OpenVMS
User Manual


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.

/[NO]CROSS_REFERENCE

/NOCROSS_REFERENCE (default)

Produces a cross-reference section within the listing file. The compiler ignores this qualifier if you do not also specify /LIST on the same command line.

/[NO]DEBUG

/DEBUG=TRACEBACK (default)

Specifies that the compiler is to generate information for use by the debugger and the run-time error traceback mechanism. A single identifier or a list of identifiers enclosed in parentheses can follow /DEBUG; these identifiers are the names of options that inform the compiler which type of information it should generate.

Table 1-4 lists the available options, their corresponding actions, and their negations.

Table 1-4 /DEBUG Qualifier Options
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.

/[NO]DESIGN

/NODESIGN (default)

Directs the compiler to accept design phase placeholders on all OpenVMS systems and comments on OpenVMS VAX systems as valid program elements within an HP Pascal program. Placeholders are produced by you or by
LSE/SCA; design comments are intended for use with LSE/SCA. Table 1-5 lists the options, their corresponding action, and their negation.

Table 1-5 /DESIGN Qualifier Options
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.

/[NO]DIAGNOSTICS

/NODIAGNOSTICS (default)

Creates a file containing compiler messages and diagnostic information. If you omit the file specification, the diagnostics file defaults to the name of your source file with a .DIA file type. The diagnostics file is used by products such as LSE/SCA..

/ENUMERATION_SIZE=keyword

Controls the allocation of unpacked enumerated data types and Boolean data types, which are considered to be an enumerated type containing two elements. Note that specifying the ENUMERATION_SIZE attribute overrides any value you previously specified with this qualifier. Table 1-6 lists the available values for keyword.

Table 1-6 /ENUMERATION_SIZE Qualifier Options
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.

/[NO]ENVIRONMENT

determined by attributes (default)

Produces an environment file in which declarations and definitions made at the outermost level of a compilation unit are saved. The default file name is the same as the source file name. The default file type is .PEN, an abbreviation for Pascal Environment. You can provide a different name for the environment file by including a file specification after the /ENVIRONMENT qualifier, for example, /ENVIRONMENT=MASTER.PEN.

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.

/[NO]ERROR_LIMIT

/ERROR_LIMIT=30 (default)

Terminates compilation after the occurrence of a specified number of error messages, excluding warning-level and information-level errors. If you specify /NOERROR_LIMIT, compilation continues until 500 errors have been detected.

/FLOAT=floattype

Selects the default format for REAL and DOUBLE data types. You must specify floattype if you use the /FLOAT qualifier. Table 1-7 lists the available options, their corresponding actions, and default information.

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.

Table 1-7 /FLOAT Qualifier Options
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.
Routines and compilation units between which double-precision quantities are passed should not mix floating-point formats. On OpenVMS I64 systems, VAX floating-point support is implemented by converting the VAX floating format values to IEEE format, performing the operation, and converting the result back to VAX floating format. Because of the conversion, some programs might get slightly different results for F_floating, D_floating, and G_floating computations than they produce on OpenVMS Alpha and OpenVMS VAX systems.

OpenVMS VAX systems do not support /FLOAT=IEEE_FLOAT.

file-spec/LIBRARY

none (default)

Specifies that a file is a text library file. The text library file specification is required. The text library files in a list of source files must be concatenated by plus signs. The default file type is .TLB.

/GRANULARITY=keyword

Directs the compiler to generate additional code to preserve the indicated granularity. Granularity refers to the amount of storage that can be modified when updating a variable. You can specify the following values for keyword:
  • BYTE
  • LONGWORD
  • QUADWORD (default)
To update a variable that is smaller than a longword on older Alpha systems, HP Pascal must issue multiple instructions to fetch the surrounding longword or quadword, update the memory inside to longword or quadword, and then write the longword or quadword back into memory. If multiple processes are writing into memory that is contained in the same longword or quadword, you might incur inaccurate results, unless /GRANULARITY=BYTE or some other synchronization mechanism is used.

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.

/INCLUDE=(directory,...)

Allows you to specify search locations for %INCLUDE directives and [INHERIT] attributes that specify file names without explicit disk or directory specifications.

The qualifier takes a list of directories to search. The compiler applies the /INCLUDE information to the following Pascal constructs:

  • %INCLUDE 'name' or %INCLUDE 'name.ext'
  • [INHERIT('name')] or [INHERIT('name.ext')]
  • %INCLUDE 'name(modname)' or %INCLUDE 'name.ext(modname)'

The compiler searches as follows:

  1. The current directory with a default extension of .pas for %INCLUDE directives, .pen for [INHERIT] attributes, and .tlb for %INCLUDE from text libraries (just like before)
  2. Any directories specified with the /INCLUDE qualifer (in the order specified) with the appropriate default extension
  3. SYS$LIBRARY: with the appropriate default extension

/[NO]LIST

/NOLIST (interactive default)

/LIST=input_file_name.LIS (batch default)

Produces a source listing file with a file type of .LIS. See the /SHOW qualifier for more information on controlling the contents of the source listing file.

/[NO]MACHINE_CODE

/NOMACHINE_CODE (default)

Produces a machine code section within the listing file. If the compiler detects errors in the source code, the compiler does not generate this section. The compiler ignores this qualifier if you do not also specify /LIST on the same command line.

/MATH_LIBRARY=keyword (OpenVMS Alpha systems only)

Determines whether the compiler uses alternate math library routines that boost performance, but sacrifice accuracy. You can specify the following values for keyword:
  • ACCURATE (default)
  • FAST

/[NO]OBJECT

/OBJECT=input_file_name.OBJ (default)

Specifies the name of the object file. If the compiler detects errors in the source code, the compiler writes no representation of object code to the listing file.

/[NO]OPTIMIZE

/OPTIMIZE (default)

Directs the compiler to optimize the code for the program or module being compiled so that the compiler generates more efficient code. A single identifier or a list of identifiers enclosed in parentheses can follow /OPTIMIZE; these identifiers are the names of options that tell the compiler which aspects of the compilation unit to optimize.

Table 1-8 lists the available options, their corresponding actions, and their negations.

Table 1-8 /OPTIMIZE Qualifier Options
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
/OPTIMIZE=NOINLINE.

 
  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.

For More Information:

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.

/[NO]PLATFORMS

/NOPLATFORMS (default)

Displays informational messages about nonportable language features for the specified platform. Table 1-9 lists the supported platforms.

Table 1-9 /PLATFORMS Qualifier Options
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.

/PSECT_MODEL=[NO]MULTILANGUAGE (OpenVMS Alpha systems only)

/PSECT_MODEL=NOMULTILANGUAGE (default)

This qualifier controls whether the compiler pads the size of overlaid PSECTs, so as to ensure compatibility when the PSECT is shared by code created by other OpenVMS Alpha compilers.