Action
Includes an ASCII file in the program at the current position.
Syntax
$INCLUDE "file"
Remarks
File |
Name of the ASCII file, which must contain valid BASCOM statements.
This option can be used if you make use of the same routines in many programs. You can write modules and include them into your program. If there are changes to make you only have to change the module file, not all your BASCOM programs. You can only include ASCII files! |
Use $INC when you want to include binary files.
See Also
Example
$regfile = "m48def.dat"
$crystal = 4000000
$baud = 19200
Config Com1 = Dummy , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
'--------------------------------------------------------------
Print "INCLUDE.BAS"
'Note that the file 123.bas contains an error
$include "123.bas" 'include file that prints Hello
Print "Back in INCLUDE.BAS"
End