COMPILE Command

The COMPILE command compiles the specified mvBASIC program. As a result, source code is compiled and object code is created. An mvBASIC program must be compiled before it can be executed.

Format

COMPILE filename progname-list [(options)]

Parameter(s)

filename

Name of the mvBASIC program file.

progname-list

Consists of the item-IDs of the programs you want to compile. If you specify multiple item-IDs, separate them with one or more spaces. An asterisk (*) specifies all programs in the file.

options

The following options are supported:

C

Suppresses the End-Of-Line (EOL) opcodes from the object code.

E

Lists error lines only.

L

Lists the mvBASIC program.

P

Sends compilation output to the printer.

S

Suppresses generation of the symbol table and messages.

Description

The source code designated in the COMPILE statement must be compatible with the designated operating system release level.

The COMPILE command compiles the mvBASIC source code into the appropriate object code and symbol definition table. The object code and symbol table are stored in the DICT of the specified file. Object code is interpreted whenever the user runs the program. The symbol table is used by the mvBASIC Debugger, when required.

NOTE

Programs will not compile unless the File Definition item in the program file dictionary has a DC file pointer. If the item lacks this pointer, the message, FORMAT ERROR IN SOURCE FILE DEFINITION displays.

BASIC is a synonym for the COMPILE command.

Compiling an mvBASIC Program

The following example compiles an mvBASIC program called AVERAGE that resides in file BP:

>COMPILE BP AVERAGE

 

*****

SUCCESSFUL COMPILE!  1 FRAMES USED.