INCLUDE

INCLUDE


IN Index Level INDEX
Syntax {$}[INCLUDE|INSERT] {file.reference} item-id  
Category BASIC
Type Statement
Description Inserts FlashBASIC code from a separate item (known as an include item) to be compiled as part of the object module of the current program or subroutine. The original source program is not altered.

The "include" statement is typically used to include an item consisting of "common" or "equate" statements, format strings, and executable statements from a single source into several programs.

When the FlashBASIC compiler encounters an "include" statement, it opens the file specified by "file.reference", reads the item, and compiles it into the current program.

Include items contain FlashBASIC statements, but need not be a complete FlashBASIC program, and it is not necessary to compile them. If an include item is modified, however, all FlashBASIC programs which "include" it must be recompiled.

When the file.reference is omitted, the current file is assumed.

There is no limit to the number of "includes" in a program, but only five levels of nesting are allowed.

The $ is optional.
Options
See Also statements & functions $INCLUDE INSERT $INSERT
Example bp standard.equates.inc
001 equ stx to char(1)
002 equ form.feed to char(12)
003 equ bell to char(7)
004 equ am to char(254), vm to char(253), svm to char(252)
005 dim customer.item(25)
006 open 'customer' to customer.file else stop 201,'customer'
007 equ last.name to customer.item(1)
008 equ first.name to customer.item(2)
009 equ title to customer.item(3)

bp prog
001 include standard.equates.inc
002 read item1 from customer.file,"01234" else print bell
Warnings When statements are "included", the corresponding source lines are NOT visible from the FlashBASIC Debugger.
Compatibility D3 7.0 AP R83
IN Index Level INDEX