Difference between revisions of "$INCLUDE"

From QB64 Wiki
Jump to navigation Jump to search
Line 2: Line 2:
  
  
The source file included can contain any BASIC statement except SUB or GOTO (though this might only apply to QB 4.5 not QB64, QB64 users can use all statements in their include files).
+
The source file included can contain any BASIC statement except [[SUB]] or [[GOTO]] (though this applies only to QB 4.5 not QB64, QB64 users can use all statements in their include files).
  
  

Revision as of 01:53, 17 September 2009

$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.


The source file included can contain any BASIC statement except SUB or GOTO (though this applies only to QB 4.5 not QB64, QB64 users can use all statements in their include files).


Syntax: REM | ' $INCLUDE: 'sourcefile'


Note: The $INCLUDE metacommand should be the last statement on a line since execution progresses after the line of the $INCLUDE metacommand.


Note 2: $INCLUDE is also often used to DECLARE functions and subs used in a external library.


Note 3: There must always be a REM or ' comment before the $INCLUDE metacommand.



Navigation:

Go to Keyword Reference - Alphabetical

Go to Keyword Reference - By usage