Compaq BASIC for OpenVMS
Alpha and VAX Systems
User Manual


Previous Contents Index

Remarks

  1. Alpha BASIC does not support this qualifier.
  2. Using /DESIGN=PLACEHOLDERS on Alpha BASIC, causes an -E- level error message.
  3. The Compaq Language-Sensitive Editor and Source Code Analyzer must be installed on your system.
  4. If you specify the /ANALYSIS_DATA qualifier, the compiler includes information about comments and placeholders in the analysis data file.
  5. /DESIGN=COMMENTS enables comment processing.
  6. /DESIGN=PLACEHOLDERS enables placeholder processing in place of BASIC syntax.
  7. If you specify the /DESIGN qualifier but do not select an option, the default is /DESIGN=(COMMENTS,PLACEHOLDERS); otherwise, the default is /NODESIGN.

/[NO]DIAGNOSTICS [ = file specification ]

/NODIAGNOSTICS (default)

The /DIAGNOSTICS qualifier creates a diagnostics file containing compiler messages and diagnostic information. The diagnostics file is used by LSE to display diagnostic error messages and to position the cursor on the line and column where a source error exists.

Remarks

  1. The Language-Sensitive Editor (LSE) must be installed.
  2. If you do not supply a file specification with the /DIAGNOSTICS qualifier, the diagnostics file has the same name as its corresponding source file and the file type .DIA. All other file specification attributes depend on the placement of the qualifier in the command. See the OpenVMS documentation set for more information.
  3. /NODIAGNOSTICS specifies that no diagnostics file is created.

/FLAG = (NODECLINING,NOBP2COMPATIBILITY,NOAXPCOMPATIBILITY) (default)

The /FLAG qualifier lets you specify whether BASIC warns you about declining features and compatibility with PDP--11 BASIC-Plus-2 and Alpha BASIC.

Remarks

  1. /FLAG = (AXPCOMPATIBILITY) is not supported by Alpha BASIC. In VAX BASIC, it issues a warning message about VAX BASIC features not supported in Alpha BASIC.
  2. /FLAG = (BP2COMPATIBILITY) is not supported by Alpha BASIC. In VAX BASIC, it causes the compiler to send a warning message about declining features and incompatibility with PDP--11 BASIC-Plus-2.
  3. /NOFLAG causes the compiler to issue no warnings about declining features and compatibility with PDP--11 BASIC--Plus--2.
  4. /FLAG = ALL is the same as /FLAG = (BP2COMPATIBILITY,DECLINING,
    AXPCOMPATIBILITY).
  5. /FLAG = NONE is the same as /NOFLAG.

/INTEGER_SIZE = (LONG) (default)

The /INTEGER_SIZE qualifier lets you specify the default size for integer data.

Remarks

  1. The default integer size (LONG) applies to all integer variables whose data type is not explicitly declared. See the Compaq BASIC for OpenVMS Alpha and VAX Systems Reference Manual for more information about integer data types.
  2. The QUAD option is not available in VAX BASIC.

/[NO]LINES

/LINES (VAX BASIC default)

/NOLINES (Alpha BASIC default)

The /LINES qualifier makes line number information available for the ERL function and the BASIC error reporter. In VAX BASIC, the RESUME statement with no target requires the /LINES qualifier, also.

Remarks

  1. In VAX BASIC, if your program contains a RESUME statement with no target or a reference to the error-handling function ERL, the compiler overrides NOLINES and signals "ERL overrides NOLINE" or "RESUME overrides NOLINE." Note that the BASIC error-reporting facility is separate from that of system traceback.
  2. /NOLINES causes line number information to be unavailable for the ERL function, the RESUME statement with no target (VAX BASIC only), and the BASIC error reporter. Specifying /NOLINES makes your program run faster and reduces program size. However, specifying /NOLINES causes the following restrictions to be in effect:

/[NO]LISTING [ = file specification ]

/LISTING (default in batch mode)

/NOLISTING (default in interactive mode)

The /LISTING qualifier causes BASIC to produce a source listing file.

Remarks

  1. /LISTING = file specification produces a file with an explicit file specification. Omitting the file specification produces a listing file with the same name as its corresponding source file and a file type of .LIS.
  2. All other file specification attributes depend on the placement of the qualifier in the command. See the OpenVMS User's Manual for more information.
  3. /LISTING only controls whether or not the compiler produces a listing file and is the default in batch mode.
  4. /SHOW controls which parts of the listing are produced.
  5. /NOLISTING specifies that no source listing file be produced and is the default at a terminal.

/[NO]MACHINE_CODE

/NOMACHINE_CODE (default)

The /MACHINE_CODE qualifier specifies that the listing file includes the compiler-generated object code.

Remarks

  1. /MACHINE_CODE specifies that the compiler include a listing of the compiler-generated object code in the listing file. In Alpha BASIC, if the /LISTING qualifier is not specified as well, /MACHINE is ignored.
  2. /NOMACHINE_CODE specifies that the listing file not include compiler-generated object code.

/[NO]OBJECT [ = file specification ]

/OBJECT (default)

The /OBJECT qualifier causes the compiler to produce an object module and optionally specifies its file name. By default, the compiler generates object files as follows:

Remarks

  1. /OBJECT = file specification produces an object file with an explicit file specification. Omitting file specification causes the compiler to produce an object file having the same name as its corresponding source file and the file type .OBJ. All other file specification attributes depend on the placement of the qualifier in the command. See the OpenVMS User's Manual for more information.
  2. /NOOBJECT suppresses the creation of an object file. During the early stages of program development, you might find it helpful to suppress the production of object files until your source program compiles without errors.

/[NO]OLD_VERSION[=CDD_ARRAYS]

/NOOLD_VERSION (default)

The /OLD_VERSION qualifier causes the compiler to change the lower bound to zero and adjusts the upper bound of the array. For example, Array 2:5 in CDD/Repository is translated by the compiler to be an array with a lower bound of 0 and an upper bound of 3. The compiler issues an informational message to confirm the array bounds.

The /NOOLD_VERSION qualifier causes the compiler to extract an array from the CDD/Repository with the bounds as specified in the data definition. For example, Array 2:5 in CDD/Repository is translated by the compiler to be an array with a lower bound of 2 and an upper bound of 5.

Remarks

  1. /OLD_VERSION[=CDD_ARRAYS] is provided for compatibility with previous versions of BASIC.
  2. CDD/Repository assumes a default lower bound of 1, if none is specified. Therefore, if no lower bound is specified, the compiler translates the CDD/Repository array to have a lower bound of 1. For example, Array 5 in CDD/Repository is translated by BASIC to be an array with a lower bound of 1 and an upper bound of 5.

/[NO]OPTIMIZE[=LEVEL=n]

/OPTIMIZE=LEVEL=4 (default)

The /OPTIMIZE qualifier causes the compiler to optimize the program to generate more efficient code for optimum run-time performance. Specifying /NOOPTIMIZE causes the compiler to perform minimal optimizations.

The level options are available in Alpha BASIC only. The qualifier has no options in VAX BASIC.

The following list describes the level options:

Remarks

  1. VAX BASIC does not support the [=LEVEL=n] option.
  2. Specify /NOOPTIMIZE if you specify /DEBUG when compiling a program. /NOOPTIMIZE expedites and simplifies the debugging session by putting the machine code in the same order as the lines in the source program. Optimizations can cause unexpected and confusing behavior in a debugging session.
  3. Specifying /OPTIMIZE, the default, usually makes programs run faster. However, using /OPTIMIZE produces extra instructions to perform the optimization, which might result in larger object modules and longer compile times than the /NOOPTIMIZE qualifier.
  4. To speed compilations during program development, compile with /NOOBJECT qualifier to check syntax, with /NOOPTIMIZE to check for correct execution, and finally with /OPTIMIZE for the final check.

/REAL_SIZE = SINGLE (default)

The /REAL_SIZE qualifier specifies the default size for floating-point data.

Remarks

  1. Alpha BASIC does not support HFLOAT. If HFLOAT is specified, the program is compiled but causes an -E-level error message, and no .OBJ file is produced.
  2. VAX BASIC does not support the IEEE floating-point types, which are SFLOAT, TFLOAT, and XFLOAT. These Alpha BASIC types are available for OpenVMS Alpha Version 7.1 or higher.
  3. The default floating-point size (SINGLE) applies to all floating-point variables whose size is not explicitly declared.

See the Compaq BASIC for OpenVMS Alpha and VAX Systems Reference Manual for more information about floating-point data types.

/[NO]ROUND_DECIMAL

/NOROUND_DECIMAL (default)

The /ROUND_DECIMAL qualifier causes the compiler to round packed decimal numbers rather than truncate them.

The /NOROUND_DECIMAL qualifier causes the compiler to truncate packed decimal numbers rather than round them.

The /ROUND_DECIMAL qualifier causes the INTEGER function to round rather than truncate the decimal part.

/SCALE = n

/SCALE = 0 (default)

The /SCALE qualifier specifies a scale factor from zero to six, inclusive. The scale factor affects only double-precision numbers. The SCALE qualifier helps to control accumulated round-off errors by multiplying floating-point values by 10 raised to the scale factor before storing them in variables. It is ignored for all but double-precision (DOUBLE) floating-point numbers.

Remarks

The /SCALE qualifier is provided for compatibility with existing programs and with other implementations of BASIC. It is recommended that you do not use this feature for new program development. Accumulated round-off errors can be better controlled with packed decimal numbers. See the Compaq BASIC for OpenVMS Alpha and VAX Systems Reference Manual for more information about packed decimal numbers.

/[NO]SEPARATE_COMPILATION

/NOSEPARATE_COMPILATION (default)

The /SEPARATE_COMPILATION qualifier causes the compiler to place individual compilation units in separate modules in the object file. /NOSEPARATE_COMPILATION, the default, groups individual compilation units in a source file as a single module in the object file.

When creating modules for use in an object library, consider using /SEPARATE_COMPILATION to minimize the size of the routines included by the linker as it creates the executable image. /SEPARATE_COMPILATION also reduces the compiler virtual memory requirements when a source contains several compilation units.

Remarks

  1. VAX BASIC does not support this qualifier.
  2. /SEPARATE_COMPILATION causes the Alpha BASIC compiler to place each routine in a separate module within the output object, which is consistent with VAX BASIC behavior.
  3. /NOSEPARATE_COMPILATION, in most cases, allows more interprocedural optimizations.

/SHOW = (CDD_DEFINITIONS, ENVIRONMENT, INCLUDE, MAP, NOOVERRIDE)
(default)

The /SHOW qualifier determines which parts of the compilation listing are created.

Remarks

  1. In Alpha BASIC, the size value for dynamically mapped arrays is the size of the actual array. In VAX BASIC, the size value is the size of the descriptors.
  2. /LISTING must be specified for /SHOW to be effective.
  3. CDD_DEFINITIONS controls whether the translation of a CDD/Repository record is displayed in the listing.
  4. ENVIRONMENT lets you display all defaults that were in effect when the program was compiled. This is the compilation listing equivalent of the SHOW command in the environment.
  5. INCLUDE controls whether files accessed with the %INCLUDE directive are displayed in the listing.
  6. MAP determines whether the listing contains an allocation map. The allocation map lists all program variables, their size, and their data type.
  7. OVERRIDE helps you debug code by disabling the effect of the %NOLIST directive.
  8. /NOSHOW causes the compiler to display only the source listing.
  9. /SHOW = ALL is the same as /SHOW = (CDD_DEFINITIONS,
    ENVIRONMENT, INCLUDE,MAP, OVERRIDE).
  10. /SHOW = NONE is the same as /NOSHOW.

/[NO]SYNCHRONOUS_EXCEPTIONS

/NOSYNCHRONOUS_EXCEPTIONS (default)

In Alpha BASIC, the default /NOSYNCHRONOUS_EXCEPTIONS qualifier allows the compiler to reorder the execution of certain arithmetic instructions to improve performance on the Alpha hardware. If a program generates an arithmetic exception, such as an overflow or divide by zero, certain statements surrounding the offending statement may or may not be executed as a result of this reordering. Consider this example:


A = B 
C = D / E 
G = F 

If the value of E is zero, the second statement will generate a divide by zero error. As a result of instruction reordering, it is possible that the assignment A = B will not take place. Further, it is possible that the assignment G = F will take place even though the previous statement generated an error.

The /SYNCHRONOUS_EXCEPTIONS qualifier disables reordering and produces compatible behavior with VAX BASIC. Use this qualifier for programs that rely on arithmetic exceptions to occur at precise times during program execution.

The /SYNCHRONOUS_EXCEPTIONS qualifier impacts only arithmetic exceptions and variable assignments in the immediate area of the excepting statement.

Very few programs should require the /SYNCHRONOUS_EXCEPTIONS qualifier to produce correct results.

Remarks

  1. VAX BASIC does not support this qualifier.

/[NO]SYNTAX_CHECK

/NOSYNTAX_CHECK (default)

The /SYNTAX qualifier causes the compiler to perform line-by-line syntax checking. When syntax checking is enabled, BASIC checks the syntax of every text line as you press Return.

Remarks

  1. Alpha BASIC does not support this qualifier.
  2. /NOSYNTAX_CHECK causes the compiler to suppress line-by-line syntax checking. When syntax checking is disabled, the compiler does not perform syntax checking until you COMPILE or RUN the program.

/TYPE_DEFAULT = REAL (default)

The /TYPE_DEFAULT qualifier lets you specify the default data type for numeric variables.

Remarks

  1. EXPLICIT specifies that all program variables must be explicitly declared in DECLARE, EXTERNAL, COMMON, MAP, or DIM statements.
  2. INTEGER, REAL, or DECIMAL specify that only variables and data which are not explicitly declared default to integer, real, or packed decimal.
  3. INTEGER_SIZE, REAL_SIZE, and DECIMAL_SIZE cause the compiler to specify the actual size of variables and data.

/VARIANT = int-const

The /VARIANT qualifier lets you specify the value associated with the lexical function %VARIANT. See Chapter 17 for more information about VARIANT and the %VARIANT lexical function.

Remarks

  1. If /VARIANT is not specified, the default value is 0.
  2. If /VARIANT is specified without a value, the default is 1.

The /WARNINGS qualifier lets you specify whether BASIC displays informational and warning messages.

Remarks

  1. Only the ALIGNMENT option is specific to Alpha BASIC. The other options are supported by both Alpha BASIC and VAX BASIC.
  2. /WARNINGS=NOWARNINGS causes the compiler to display informational messages but not warning messages.
  3. /WARNINGS=NOINFORMATIONALS causes the compiler to display warning messages but not informational messages.
  4. /NOWARNINGS causes the compiler to suppress any informational or warning messages.
  5. /WARNINGS=ALIGNMENT causes the Alpha BASIC compiler to flag all occurrences of non-naturally aligned RECORD fields, variables within COMMONs and MAPs, and RECORD arrays.
    An aligned data item starts on an address that is natural for that data type. Unaligned data accesses on Alpha can significantly reduce performance. Table 3-1 lists the natural boundaries for the supported data types.

    Table 3-1 Natural Boundaries For Supported Alpha BASIC Data Types
    Data Type Natural Boundary
    BYTE BYTE
    DECIMAL BYTE
    DOUBLE QUADWORD
    DYNAMIC STRING BYTE
    GFLOAT QUADWORD
    LONG LONGWORD
    QUAD QUADWORD
    RECORD Depends on contents
    RFA BYTE
    SFLOAT LONGWORD
    SINGLE LONGWORD
    STATIC STRING BYTE
    TFLOAT QUADWORD
    WORD WORD
    XFLOAT OCTAWORD

    /WARNINGS=NOALIGNMENT, the Alpha BASIC default, causes the compiler not to issue any warning messages about unaligned data.
    The Alpha BASIC compiler naturally aligns all local variables and arrays, but it is the responsibility of the BASIC programmer to naturally align COMMONs, MAPS, and RECORDs. The /WARNING=ALIGNMENT qualifier flags all occurrences of non-naturally aligned items. This helps the programmer identify and correct unaligned entities.
    An entity can be unaligned in the following ways:

  6. For VAX BASIC, /WARNINGS = ALL is the same as /WARNINGS = (INFORMATIONAL, WARNINGS). For Alpha BASIC, /WARNINGS = ALL is the same as /WARNINGS = (INFORMATIONAL, WARNINGS, ALIGNMENT).
  7. /WARNINGS = NONE is the same as /NOWARNINGS.

3.1.3 Declining Qualifiers and Their Recommended Replacements

The following qualifiers are declining features:

/BYTE
/DOUBLE
/GFLOAT
/HFLOAT
/LONG
/SINGLE
/TIE
/WORD

It is recommended that you replace them with newer qualifiers, as follows:
Old Qualifier Recommended Replacement
/BYTE /INTEGER_SIZE=BYTE
/DOUBLE /REAL_SIZE=DOUBLE
/GFLOAT /REAL_SIZE=GFLOAT
/HFLOAT /REAL_SIZE=HFLOAT
/LONG /INTEGER_SIZE=LONG
/SINGLE /REAL_SIZE=SINGLE
/WORD /INTEGER_SIZE=WORD

See the description of the /[NO]FLAG=[NO]DECLINING qualifier in this chapter. Also see the descriptions of the /INTEGER_SIZE and /REAL_SIZE qualifiers in this chapter. The descriptions of the old qualifiers are in the Compaq BASIC for OpenVMS Alpha and VAX Systems Reference Manual.


Previous Next Contents Index