{{fbdoc item="title" value="$INCLUDE"}}----
Metacommand statement to include contents of another source file

{{fbdoc item="syntax"}}##
	'$Include [once]: '//file//'
		//or//
	[[KeyPgRem|rem]] $Include [once]: '//file//'
##
{{fbdoc item="desc"}}
	##**$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 ##[[KeyPgInclude|#include]]## instead.

{{fbdoc item="ex"}}
{{fbdoc item="filename" value="examples/manual/meta/header.bi"}}%%(freebasic)
' header.bi file
Type FooType
	Bar As Byte
	Barbeque As Byte 
End Type
Dim Foo As FooType
%%

{{fbdoc item="filename" value="examples/manual/meta/include.bas"}}%%(freebasic)
'' compile with -lang fblite or qb

#lang "fblite"

'' main.bas file

'$INCLUDE: "header.bi"

Foo.Bar = 1
Foo.Barbeque = 2
%%
{{fbdoc item="lang"}}
	- Only available in the //[[CompilerOptlang|-lang fblite]]// and //[[CompilerOptlang|-lang qb]]// dialects.

{{fbdoc item="diff"}}
	- None

{{fbdoc item="see"}}
	- ##[[KeyPgInclude|#include]]##

{{fbdoc item="back" value="CatPgCompilerSwitches|Compiler Switches"}}