Compiler Directives

There are four compiler directive statements. Each of these statements begins with a dollar sign ($).

Comments in the Object Code

The $* statement places a comment directly in the object code of a program when it is compiled. It is most useful for entering version numbers or copyright information before software is distributed.

Reading External Source Code ($CHAIN, $INCLUDE, $INSERT)

Three statements tell the compiler to read source code from another file item: $INCLUDE, $INSERT, and $CHAIN.

$INCLUDE and $INSERT are identical statements. Either statement results in the program being compiled as if the external source code were written at the point where the $INCLUDE or $INSERT statement had been entered. Compilation will then continue at the line after the $INCLUDE or $INSERT statement. $INCLUDE and $INSERT are also useful for any code that might be used by several different programs. An example of such code might be a file item containing COMMON statements.

The $CHAIN statement is different from $INCLUDE and $INSERT in that the compilation will not return to the original program. The $CHAIN statement is not intended for code which might be shared by several programs, but for programs which may have source code longer than 32K bytes. The $CHAIN statement allows several different file items containing source code to be CHAINed together.

The only restriction to $INCLUDE, $INSERT, and $CHAIN is that the number of bytes in the resulting object code cannot exceed 248K.

See Also

Overview of mvBASIC Statements and Functions

Assignment Statements

Intrinsic Functions

Internal Program Control

External Program Control

Sending Output to the Screen and Printer

Terminal Input

Dynamic Array Processing

Generalized String Processing

Dimensioned Arrays

Reading and Updating File Items

Reading and Writing Tapes or Floppy Disks

Communications

Execution Locks

Miscellaneous Statements and Functions

The Error Message Processor