bas7advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
$INCLUDE Metacommand Details
  Syntax  Details  Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
The $INCLUDE metacommand instructs the compiler to:
 
    1. Temporarily switch from processing one file.
    2. Read program statements from the BASIC file named in filespec.
    3. Return to processing the original file when the end of the
       included file is reached.
 
REM $INCLUDE: 'filespec'
          or
' $INCLUDE: 'filespec'
 
Usage Notes
    ■ Because compilation begins with the line immediately following the
      line in which $INCLUDE occurred, $INCLUDE should be the last
      statement on the line. For example:
 
         DEFINT I-N   ' $INCLUDE: 'COMMON.BAS'
 
    ■ When you are running a program from the QBX environment, included
      files must not contain SUB or FUNCTION statements. When compiling
      a program from the BC command line, SUB or FUNCTION statements may
      contain included files.
    ■ Included files created with BASICA must be saved with the ,A option.
    ■ Included files created with QBX must be in text (not binary) format.