===How to $INCLUDE a BAS or Text file with a QB64 Program===
* Assemble the code to be reused into a file.
* Common extensions are '''.BI''' (for declarations, usually included in the beginning of a program) or '''.BM''' (with SUBs and FUNCTIONs, usually included at the end of a program).
** Any extension can be used, as long as the file contains code in plain text (binary files are not accepted).
* $INCLUDE any [[DIM]], [[CONST]], [[SHARED]] arrays or [[DATA]] at the '''beginning''' of the main program code.
* $INCLUDE [[SUB]]s or [[FUNCTION]]s at the bottom of the main program code '''after any SUB procedures.'''
** '''Note:''' [[TYPE]] definitions, [[DATA]] and [[DECLARE LIBRARY]] can be placed inside of sub-procedures.
* '''Compile''' the program.
*''Note: Once the program is compiled, the included text files are no longer needed with the program EXE.''