Metacommand statement to include contents of another source file

'$Include [once]: 'file'
rem $Include [once]: 'file'

$include inserts source code from another file at the point where the $include metacommand appears. This has the effect of compiling the source code from the include file as though it were part of the source file that includes it. Once the compiler has reached the end of the include file, the original source file continues to be compiled.

The once specifier tells the compiler to include the file only once even if it is included several times by the source code.

'$Include: exists for compatibility with QuickBASIC. It is recommended to use #include instead.

' header.bi file
Type FooType
    Bar As Byte
    Barbeque As Byte
End Type
Dim Foo As FooType

'' compile with -lang fblite or qb

#lang "fblite"

'' main.bas file

'$INCLUDE: "header.bi"

Foo.Bar = 1
Foo.Barbeque = 2

Dialect Differences:
Differences from QB:
See also:
Back to Compiler Switches
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki

sf.net phatcode