$INCLUDE

From QB64 Wiki
Revision as of 01:19, 18 September 2009 by imported>Clippy
Jump to navigation Jump to search

$INCLUDE is a metacommand that is used to insert a source file into your program which is then executed at the point of the insertion.


Syntax: {REM | '} $INCLUDE: 'sourcefile'


  • The source file MUST have REM or apostrophies around the name.
  • The source file included can contain any BASIC statement except SUB or GOTO
  • QB 4.5 can use SUB calls in BI files such as QB.BI.
  • QB64 users can use all statements in their include files.
  • The $INCLUDE metacommand should be the last statement on a line since execution progresses after the line of the $INCLUDE metacommand.
  • $INCLUDE is often used to DECLARE functions and subs used in a external library.
  • There must always be a REM or ' comment before the $INCLUDE metacommand.


Example: ' $INCLUDE: 'QB.BI'


See also: INTERRUPT, INTERRUPTX


Navigation:

Go to Keyword Reference - Alphabetical

Go to Keyword Reference - By usage