3.1.1 BASIC Command
When you compile your source program, use the BASIC
command, which has the following format:
BASIC [ /qualifier ...][ file specification [ /qualifier ...]],...)
/qualifier
Indicates a specific action to be performed by the compiler
on all files or specific files listed. When a qualifier appears
directly after the BASIC command, it affects all files listed.
file specification
Indicates the name of the input source file that contains the
program or module to be compiled. You are not required
to specify a file extension; the BASIC compiler assumes the
default file type .BAS.
In VAX BASIC, if you enter the command BASIC without
a file specification, you enter the BASIC environment. DEC
BASIC does not support the BASIC environment. For more
information about the BASIC environment, see Chapter 2.
Most of the command qualifiers to the BASIC command
affect all files specified in the command line, no matter
where the qualifiers are placed; these are called global
qualifiers . However, the qualifiers /LISTING, /OBJECT,
/DIAGNOSTICS, and /ANALYSIS_DATA are positional
qualifiers ; that is, depending on their position in the com-
mand line, they can affect all or only some of the specified
files. The rules for positional qualifiers are as follows:
.
If the positional qualifier is located directly following the
command name, it affects all the specified files.
.
If the file specifications are separated by commas, then
any positional qualifier directly following a file specifica-
tion affects only that file.
.
If the file specifications are separated by CDD/Repository
signs, then any positional qualifier directly following a list
of file specifications affects only the resulting appended
file.
.
The rightmost qualifier overrides any conflicting qualifier
previously specified in the command line.
The placement of these positional qualifiers causes BASIC to
produce or not produce listing files, object files, and diagnostics
files. For example:
$ BASIC/LIST/OBJ PROG1/NOOBJ/DIAG,PROG2+PROG3/NOLIST
This command does the following:
VAX BASIC requires that source files using the plus sign (+)
to append source files, use line numbers within the files, or an
error message is printed.
DEC BASIC does not require line numbers in either of the
source files. The "+" operator is treated as an OpenVMS
append operator. DEC BASIC appends and compiles the
separate files as if they were a single source file.