Invokes the VSI BASIC for OpenVMS I64 compiler. Format: BASIC [/command-qualifier]... {source-file [/file-qualifier]... }... When you supply one or more file specifications, the compiler compiles the source file(s). If you separate source file specifications with commas, the compiler compiles each module separately and produces multiple object files. If you separate source file specifications with plus signs (+), the compiler appends the files and produces a single object file.
1 – Release notes
The release notes for the current version of VSI BASIC for OpenVMS I64 are in the file BASIC018.RELEASE_NOTES which resides in SYS$HELP. You can also access the release notes from the BASIC help file at the DCL command level with the following command: $ HELP/LIBRARY=BASICHELP RELEASE_NOTES
2 /ANALYSIS_DATA
The /ANALYSIS_DATA qualifier controls the creation of a file containing data analysis information for use by the DECset Source Code Analyzer for OpenVMS systems (SCA). The format of the /ANALYSIS_DATA qualifier is as follows: /[NO]ANALYSIS_DATA[=file-spec] The file created by the /ANALYSIS_DATA qualifier has a default file type of .ANA. SCA uses the .ANA file to display cross-reference information and analyze source code. The default is /NOANALYSIS_DATA.
3 /ARCHITECTURE
The /ARCHITECTURE qualifier specifies which version of the architecture to generate instructions for. The format of the /ARCHITECTURE qualifier is as follows: /ARCHITECTURE={GENERIC } {HOST } {MERCED } {ITANIUM2} where: GENERIC generate instructions that are appropriate for all processors. This option is the default. HOST generate instructions for the processor that the compiler is running on. The default is /ARCHITECTURE=GENERIC.
4 /AUDIT
The /AUDIT qualifier causes the compiler to include a history entry in CDD/Repository when extracting a CDD/Repository definition. The format of the /AUDIT qualifier is as follows: /[NO]AUDIT[={str-lit }] {file-spec} where: str-lit is a quoted string. file-spec is a file specification. If you specify a quoted string, the compiler includes it as part of the history entry. If you specify a file specification, the compiler includes up to the first 64 lines of the specified file. When you specify /AUDIT, the compiler also includes the following information about a CDD/Repository record extraction in the history entry: o The name of the program module making the extraction o The time and date of the extraction o A note that access was made by way of a VSI BASIC for OpenVMS I64 program o A note that the access was an extraction o The username and UIC of the process accessing CDD/Repository The default is /NOAUDIT.
5 /CHECK
The /CHECK qualifier causes the compiler to generate code to test for arithmetic overflow and for array references outside array boundaries when the program executes. The format of the /CHECK qualifier is as follows: /[NO]CHECK[=({[NO]BOUNDS },...)] {[NO]OVERFLOW[=([NO]INTEGER,[NO]DECIMAL)]} {ALL } {NONE } where: BOUNDS checks array subscripts to ensure that they are within array boundaries specified by the program. OVERFLOW enables the detection of arithmetic overflow for integer and packed decimal operations. The /CHECK qualifier specifies that both OVERFLOW and BOUNDS checking are performed. The /NOCHECK qualifier specifies that no checking is performed. If you specify /CHECK=OVERFLOW, overflow checking is enabled for both integers and packed decimal numbers. Similarly, specifying /CHECK=NOOVERFLOW disables overflow checking for both types of numbers. Specifying /CHECK=NOBOUNDS means that your program is smaller and runs faster. However, no error is signaled for an array reference outside the bounds of an array. This means that the program may get a memory management or access violation error at run time. Therefore, this option should be used only for programs that have been thoroughly debugged and whose execution time is critical. The default is /CHECK = (BOUNDS, OVERFLOW).
6 /CROSS_REFERENCE
The /CROSS_REFERENCE qualifier causes the compiler to generate a cross-reference listing. The format of the /CROSS_REFERENCE qualifier is as follows: /[NO]CROSS_REFERENCE[=[NO]KEYWORDS] The cross-reference listing shows program symbols, their class, and the program lines in which they are referenced. The /CROSS_REFERENCE=KEYWORDS qualifier specifies that the cross-reference listing includes all references to VSI BASIC keywords. /CROSS_REFERENCE is the same as /CROSS_REFERENCE = NOKEYWORDS. The /NOCROSS_REFERENCE qualifier suppresses the creation of a cross-reference listing. See the HP BASIC for OpenVMS Alpha and VAX Systems User Manual for more information on cross reference listings. The default is /NOCROSS_REFERENCE.
7 /DEBUG
The /DEBUG qualifier causes the compiler to provide information for the OpenVMS Debugger and the system run-time error traceback mechanism. Neither TRACEBACK nor SYMBOLS affects a program's executable code. The format of the /DEBUG qualifier is as follows: /[NO]DEBUG[=({[NO]SYMBOLS },...)] {[NO]TRACEBACK} {ALL } {NONE } where: SYMBOLS causes the compiler to provide the debugger with local symbol definitions for user-defined variables (including dimension information for arrays). TRACEBACK causes the compiler to provide an address correlation table so the debugger and the run-time error traceback mechanism can translate absolute addresses into source program routine names and line numbers. The /NODEBUG qualifier causes the compiler to suppress information for the OpenVMS Debugger and the system run-time error traceback mechanism. For more information on debugging, see the HP BASIC for OpenVMS Alpha and VAX Systems User Manual. The default is /DEBUG = (TRACEBACK, NOSYMBOLS).
8 /DECIMAL_SIZE
The /DECIMAL_SIZE qualifier lets you specify the default size for packed decimal data. You specify the total number of digits in the number and the number of digits to the right of the decimal point. The format of the /DECIMAL_SIZE qualifier is as follows: /DECIMAL_SIZE=(d,s) where: d is the total number of digits in the number. s is the number of digits to the right of the decimal point. The default decimal size applies to all decimal variables for which the total number of digits and digits to the right of the decimal point are not explicitly declared. See the HP BASIC for OpenVMS Alpha and VAX Systems Reference Manual for more information about packed decimal numbers. The default is /DECIMAL_SIZE = (15, 2).
9 /DEPENDENCY_DATA
If you have CDD/Repository V5.4 installed on your system and if your current CDD$DEFAULT is a CDO-format dictionary, you can use the /DEPENDENCY_DATA qualifier to generate a compiled module entity in the CDD$DEFAULT for each compilation unit. The format of the /DEPENDENCY_DATA qualifier is as follows: /[NO]DEPENDENCY_DATA You must specify this qualifier if you want %INCLUDE %FROM %CDD and %REPORT %DEPENDENCY directives to establish dependency relationships. If /NODEPENDENCY_DATA is specified, the compiler does not generate a compiled module entity. The default is /NODEPENDENCY_DATA.
10 /DIAGNOSTICS
The /DIAGNOSTICS qualifier controls the creation of a diagnostics file containing messages and diagnostic information for use by the Compaq Language-Sensitive Editor (LSE). The format of the /DIAGNOSTICS qualifier is as follows: /[NO]DIAGNOSTICS[=file-spec] LSE uses the diagnostics file to display diagnostic error messages and to position the cursor on the line and column where a source error exists. 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 a default file type of .DIA. All other file specification attributes depend on the placement of the qualifier in the command. The default is /NODIAGNOSTICS.
11 /DOUBLE
The /DOUBLE qualifier specifies that floating-point variables are double precision. This qualifier is present for compatibility with HP BASIC for OpenVMS VAX. You should use the /REAL_SIZE qualifier to specify the precision of floating-point variables.
12 /FLAG
The /FLAG qualifier lets you specify whether the compiler informs you about declining features. The format of the /FLAG qualifier is as follows: /[NO]FLAG[=[NO]DECLINING] The /NOFLAG qualifier suppresses any warning messages about declining features. /FLAG is the same as /FLAG = NODECLINING. The default is /NOFLAG.
13 /INTEGER_SIZE
The /INTEGER_SIZE qualifier lets you specify the default size for integer data. The format of the /INTEGER_SIZE qualifier is as follows: /INTEGER_SIZE={BYTE} {WORD} {LONG} {QUAD} The default integer size applies to all integer variables whose data type is not explicitly declared. See the HP BASIC for OpenVMS Alpha and VAX Systems User Manual for more information about integer data types. The default is /INTEGER_SIZE = LONG.
14 /LINES
The /LINES qualifier makes line number information available for the ERL function, and the BASIC error reporter. The format of the /LINES qualifier is as follows: /[NO]LINES Note that if ERL (or RESUME) is found in a program that is compiled /NOLINES, HP BASIC for OpenVMS Alpha will not produce the message, but will silently turn on /LINES. If you specify /NOLINES, your program runs faster. The default is /NOLINES.
15 /LISTING
The /LISTING qualifier causes the compiler to create a source listing file. The format of the /LISTING qualifier is as follows: /[NO]LISTING[=file-spec] To create a listing file with an explicit file specification, you must use the /LISTING qualifier in the form /LISTING = file-spec. Otherwise, the listing file has the same name as its corresponding source file and a file type of .LIS. All other file specification attributes depend on the placement of the qualifier in the command. Note that the /LISTING qualifier only controls whether or not the compiler produces a listing file. The /SHOW qualifier controls which parts of the listing are produced. The default is /NOLISTING from a terminal, and /LISTING in batch mode.
16 /LONG
The /LONG qualifier specifies that integer variables are LONG. This qualifier is present for compatibility with HP BASIC for OpenVMS VAX. You should use the /INTEGER_SIZE qualifier to specify the precision of integer variables.
17 /MACHINE_CODE
The /MACHINE_CODE qualifier controls whether the listing file contains a list of compiler generated machine code. The format of the /MACHINE_CODE qualifier is as follows: /[NO]MACHINE_CODE The /MACHINE_CODE qualifier has no effect unless you also specify the /LISTING qualifier. If you specify the /MACHINE_CODE qualifier with the /OPTIMIZE qualifier, the machine code listing may not reflect the actual code executed for a given statement nor the order of execution. The /NOMACHINE_CODE qualifier suppresses compiler generated machine code in the listing file. The default is /NOMACHINE_CODE.
18 /OBJECT
The /OBJECT qualifier causes the compiler to produce an object module, and optionally specifies its file name. The format of the /OBJECT qualifier is as follows: /[NO]OBJECT[=file-spec] By default, the compiler generates object files as follows: o If you specify one source file, the compiler generates one object file. o If you specify multiple source files separated by plus signs, the compiler appends the files and generates one object file. o If you specify multiple source files separated by commas, the compiler compiles and generates a separate object file for each source file. o You can use both plus signs and commas in the same command line to produce different combinations of appended and separated object files. To produce an object file with an explicit file specification, you must use the /OBJECT qualifier, in the form /OBJECT=file-spec. Otherwise, the object file has the same name as its corresponding source file, and a file type of .OBJ. All other file specification attributes depend on the placement of the qualifier in the command. The /NOOBJECT qualifier suppresses the creation of an object file. During the early stages of program development, you may find it helpful to suppress the production of object files until your source program compiles without errors. The default is /OBJECT.
19 /OLD_VERSION
The /OLD_VERSION qualifier is provided for compatibility with early versions of HP BASIC for OpenVMS VAX. The format of the /OLD_VERSION qualifier is as follows: /[NO]OLD_VERSION[=CDD_ARRAYS] When you use the /OLD_VERSION qualifier, the compiler changes 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 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. 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 the compiler to be an array with a lower bound of 1 and an upper bound of 5. The default is /NOOLD_VERSION.
20 /OPTIMIZE
The /OPTIMIZE qualifier controls whether the compiler optimizes the program to generate more efficient code for optimum run-time performance. The format of the /OPTIMIZE qualifier is as follows: /[NO]OPTIMIZE[=({LEVEL=n },...)] {TUNE={GENERIC}} {HOST } where: LEVEL=n controls the amount of optimization performed. /OPTIMIZE=LEVEL=4 is the equivalent of /OPTIMIZE. 0 all optimizations are turned off. Has the same effect as /NOOPTIMIZE. 1 local optimizations and common subexpression recognition turned on. 2 adds some global optimizations including loop unrolling, split lifetime analysis, code motion, and code scheduling to those in level 1. 3 adds more global optimizations that improve speed (at the cost of extra code size), such as integer multiplication and division expansion (using shifts), loop unrolling, and code replication to eliminate branches to those in level 2. 4 adds automatic inline expansion of procedures and functions to those of level 3. This is the default level. TUNE=processor selects processor-specific instruction tuning for a specific implementation of the Itanium architecture. Tuning for a specific implementation can provide improvements in run-time performance. Regardless of the setting of the TUNE option, the generated code will run correctly on all implementations of the Itanium architecture. Note that code tuned for a specific target may run more slowly on another target than generically-tuned code. Also see the /ARCHITECTURE qualifier. TUNE=GENERIC is the default. The processor keyword can be one of the following: GENERIC selects instruction tuning that is appropriate for all implementations of the Itanium architecture. This option is the default. HOST selects instruction tuning that is appropriate for the machine on which the code is being compiled. ITANIUM2 selects instruction tuning for the Itanium2 implementation of the Itanium architecture. MERCED selects instruction tuning for the Merced implementation of the Itanium architecture. The default is /OPTIMIZE=(LEVEL=4, TUNE=GENERIC).
21 /REAL_SIZE
The REAL_SIZE qualifier lets you specify the default size for floating-point data. The format of the REAL_SIZE qualifier is as follows: /REAL_SIZE={SINGLE} {DOUBLE} {GFLOAT} {SFLOAT} {TFLOAT} {XFLOAT} The default floating-point size applies to all floating-point variables whose size is not explicitly declared. See the HP BASIC for OpenVMS Alpha and VAX Systems User Manual for more information on floating-point data types. The default is /REAL_SIZE = SFLOAT.
22 /ROUND_DECIMAL
The /ROUND_DECIMAL qualifier causes the compiler to round packed decimal numbers rather than truncate them. The format of the /ROUND_DECIMAL qualifier is as follows: /[NO]ROUND_DECIMAL The /NOROUND_DECIMAL qualifier causes the compiler to truncate packed decimal numbers rather than round them. The default is /NOROUND_DECIMAL.
23 /SCALE
The /SCALE qualifier specifies a scale factor between zero and six, inclusive. The scale factor affects only double-precision numbers. The format of the /SCALE qualifier is as follows: /SCALE=n The /SCALE qualifier helps to control accumulated round-off errors by multiplying floating-point values by 10 raised to the scale factor power before storing them in variables. The /SCALE qualifier is ignored for all but double-precision floating-point numbers. NOTE The /SCALE qualifier is provided for compatibility with HP BASIC for OpenVMS VAX. It is recommended that you not use this feature for new program development. Accumulated round-off errors can be better controlled with packed decimal numbers. See the HP BASIC for OpenVMS Alpha and VAX Systems Reference Manual for more information on packed decimal numbers. The default is /SCALE = 0.
24 /SEPARATE_COMPILATION
Controls whether an individual compilation unit becomes a separate module in an object file. The format of the /SEPARATE_COMPILATION qualifier is as follows: /[NO]SEPARATE_COMPILATION Specifying /SEPARATE_COMPILATION will cause the compiler to place each routine in a separate module within the output object file. This is HP BASIC for OpenVMS VAX behavior. Specifying /NOSEPARATE_COMPILATION groups individual compilation units as a single module in an 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. Using /SEPARATE_COMPILATION will also reduce the compiler virtual memory requirements when a source contains several compilation units. In most cases /NOSEPARATE_COMPILATION allows more interprocedural optimizations. The default is /NOSEPARATE_COMPILATION.
25 /SHOW
The /SHOW qualifier determines which parts of the compilation listing are created. The /LISTING qualifier must have been specified for the /SHOW qualifier to have any effect. The format of the /SHOW qualifier is as follows: /[NO]SHOW[=({[NO]CDD_DEFINITIONS},...)] {[NO]ENVIRONMENT } {[NO]INCLUDE } {[NO]MAP } {[NO]OVERRIDE } {ALL } {NONE } where: CDD_DEFINITIONS controls whether the translation of a CDD/Repository record is displayed in the listing. ENVIRONMENT lets you display all defaults that were in effect when the program was compiled. INCLUDE controls whether files accessed with the %INCLUDE directive are displayed in the listing. MAP determines whether the listing contains an allocation map. The allocation map lists all program variables, their size and their data type. OVERRIDE helps you debug code by disabling the effect of the %NOLIST directive. The /NOSHOW qualifier causes the compiler to display only the source listing. /SHOW = ALL is the same as /SHOW = (CDD_DEFINITIONS, ENVIRONMENT, INCLUDE, MAP, OVERRIDE). /SHOW = NONE is the same as /NOSHOW. /SHOW is the same as /SHOW = ALL. The default is /SHOW = (CDD_DEFINITIONS, ENVIRONMENT, INCLUDE, MAP, NOOVERRIDE).
26 /SINGLE
The /SINGLE qualifier specifies that floating-point variables are single precision. This qualifier is present for compatibility with HP BASIC for OpenVMS VAX. You should use the /REAL_SIZE qualifier to specify the precision of floating-point variables.
27 /SYNCHRONOUS_EXCEPTIONS
Controls whether or not the compiler produces additional code to emulate HP BASIC for OpenVMS VAX exception behavior. The format of the /SYNCHRONOUS_EXCEPTIONS qualifier is as follows: /[NO]SYNCHRONOUS_EXCEPTIONS Normally the compiler may reorder the execution of certain arithmetic instructions to improve performance. If your program generates an arithmetic exception, such as an overflow or divide by zero, it is possible that certain statements surrounding the offending statement may or may not have executed. For example if a source program contains: A = B C = D / E G = F and the value of E is zero, the second statement will generate a divide by zero exception. Because of instruction reordering, it is possible that the assignment of B to A may not take place. Further, it is possible that the assignment of F to G may take place even though the previous statement generated an exception. The /SYNCHRONOUS_EXCEPTIONS qualifier disables such reordering. This allows programs which rely on arithmetic exceptions occurring at precise times to execute as expected. It only impacts arithmetic exceptions and variable stores in the immediate vicinity of the excepting statement. Usually programs will produce the correct result without the /SYNCHRONOUS_EXCEPTIONS qualifier. The /NOSYNCHRONOUS_EXCEPTIONS qualifier allows the compiler to produce more efficient code. However this instruction reordering can cause incompatibilities with VAX BASIC. The default is /NOSYNCHRONOUS_EXCEPTIONS.
28 /TYPE_DEFAULT
The /TYPE_DEFAULT qualifier lets you specify the default data type for numeric variables. The format of the /TYPE_DEFAULT qualifier is as follows: /TYPE_DEFAULT={INTEGER } {REAL } {DECIMAL } {EXPLICIT} Specifying EXPLICIT means that all program variables must be explicitly declared in DECLARE, EXTERNAL, COMMON, MAP or DIM statements. Specifying INTEGER, REAL, or DECIMAL means that variables and data which are not explicitly declared default to integer, real or packed decimal. To specify the actual size of variables and data, use the INTEGER_SIZE, REAL_SIZE and DECIMAL_SIZE qualifiers. The default is /TYPE_DEFAULT = REAL.
29 /VARIANT
The /VARIANT qualifier lets you specify the value associated with the lexical variable %VARIANT. The format of the /VARIANT qualifier is as follows: /VARIANT[=int-const] See the HP BASIC for OpenVMS Alpha and VAX Systems User Manual or HP BASIC for OpenVMS Alpha and VAX Systems Reference Manual for more information about the /VARIANT qualifier and the %VARIANT lexical variable. If the /VARIANT qualifier is not specified, the value of %VARIANT is 0. If the /VARIANT qualifier is specified without a value, the value of %VARIANT is 1. The default is /VARIANT = 0.
30 /WARNINGS
The /WARNINGS qualifier lets you specify whether the compiler displays informational, warning, or alignment messages. The format of the /WARNINGS qualifier is as follows: /[NO]WARNINGS[=({[NO]WARNINGS },...)] {[NO]INFORMATIONALS} {[NO]ALIGNMENT } {ALL } {NONE } Specifying /WARNINGS=NOWARNINGS causes the compiler to suppress warning messages. Specifying /WARNINGS=NOINFORMATIONALS causes the compiler to suppress informational messages. Specifying /WARNINGS=NOALIGNMENT causes the compiler to suppress alignment warning messages. Alignment warnings are suppressed by default; to get alignment warning messages, you must explicitly specify /WARNINGS=ALIGNMENT on the command line. The /NOWARNINGS qualifier causes the compiler to suppress any informational, warning, or alignment messages. /WARNINGS = ALL is the same as /WARNINGS = (INFORMATIONALS, WARNINGS, ALIGNMENT). /WARNINGS = NONE is the same as /NOWARNINGS. The default is /WARNINGS = (INFORMATIONALS, WARNINGS, NOALIGNMENT).
31 /WORD
The /WORD qualifier specifies that integer variables are word length. This qualifier is present for compatibility with HP BASIC for OpenVMS VAX. You should use the /INTEGER_SIZE qualifier to specify the precision of integer variables.
32 – Language topics
To access the online language help, type the following command: $ HELP/LIBRARY=BASICHELP