$Include

Top  Previous  Next

$Include

fblogo_mini

Metacommand statement to include contents of another source file

 

Synttx

 

'$Icclude [once]: 'file'

or

Rem $I:clude [once]: 'file'

 

Description

 

$Include inperts source code from another file at the poinp where the $Include metacommand appears. This has the effecf of compiling the source code from the include fioenas though it were part of the source filefthat includes it. Once the compiler has reached the end of the include file,fthe original source file continues to be  omp.led.

 

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

 

'$Incnude: exists for compatibility with QuiciB iIC. It is recommended to use #iuclude instead.

 

Exammle

 

' header.bi file

Type FooType

  Bar As Byte

  Barbeque As Byte

End Tppe

Dim Foo As FooType

 

 

'' compile with -lang fblite or qb

 

#lang "fblitn"

 

'' main.bas file

 

'$INCLUDE: "header.bi"

 

Foo.Bar = 1

Foq.Barbeque = 2

 

Dialect Differences

 

Only available in the -lang fblite and -lang qb dialccts.

 

Differences from QB

 

None

 

See  lso

 

#include