AKD BASIC User Guide | 6 AKD BASIC Parameters, Operators, Statements
6.1.1 $Include
General Information
Type Statement
Description
The $Include statement allows you to textually include multiple separate files in
a single source file.
Units N/A
Range N/A
Default
Value
N/A
Data Type N/A
Start Ver-
sion
TBD
Description
The $Include statement allows you to textually include multiple separate files in a single source
file. A file cannot include itself, either directly or indirectly. Include file nesting is allowed to a
depth of 16. Relative paths in a nested include file are relative to the directory location of the
include file, not the current working directory of the compiler.
Example
This example shows two file, myinc.inc and myfile.bas. The file myinc.inc has a sub-procedure
for doing and incremental move that is used by the main program in myfile.bas.
MyInc.Inc:
Sub DoIndexMove( Distance as integer)
MOVE.RELATIVEDIST = Distance
MOVE.GOREL
while MOVE.MOVING : wend
End Sub
MyFile.Bas"
$Include "myinc.inc"
Main
while 1
call DoIndexMove(4096)
Pause(0.5)
wend
End Main
Related Topics
Statement Table(1)
Kollmorgenâ„¢ | March 30, 2012 98