
Chapter 14. Statement Reference
334
Syntax:
Syntax 1:
REM $INCLUDE:’filename’
Syntax 2:
’$INCLUDE:’filename’
Description:
$INCLUDE
reads a source program specified by
’filename’
into the program
line immediately following the
$INCLUDE
line in compilation.
Storing definitions of variables, subroutines, user-defined functions, and other data
to be shared by source programs into the included files will promote application of
valuable program resources.
If this statement is placed at the beginning of source programs, then same user-
defined functions or subroutines may be shared by those source programs.
•
filename
is a file to be included.
• If the specified filename does not exist in compiling a source program, a fatal error
occurs and the compilation terminates.
• No characters including space should be put between
$
and
INCLUDE
and
between single quotes (') and
filename
.
• As shown below, if any character except for space or tab codes is placed between
REM
and
$INCLUDE
in syntax 1 or between a single quote (') and
$INCLUDE
in
syntax 2, the program line will be regarded as a comment line so that the
$INCLUDE
statement will not execute.
REM xxx $INCLUDE:’mdlprg1.SRC’
• Before specifying included files, it is necessary to debug them carefully.
•
$INCLUDE
statements cannot be nested.
• The program lines in included files will not be outputted to the compile list.
If a compilation error occurs in an included file, the error message shows the line
number where the
$INCLUDE
statement is described.
Symbols defined in included files will not be outputted to the symbol list.
• If a program line in an included file refers to a variable, user-defined function, or
others defined outside the included file, then the program line number where the
$INCLUDE
statement is described will be outputted to the cross reference list, as
the referred-to line.
File I/O statement
$INCLUDE
Specifies an included file.
Содержание BHT-BASIC 100 SERIES
Страница 1: ......
Страница 161: ...153 Chapter 10 Sleep Function CONTENTS 10 1 Sleep Function 154...
Страница 163: ...155 Chapter 11 Resume Function CONTENTS 11 1 Resume Function 156...
Страница 173: ...165 Chapter 13 Backlight Function CONTENTS 13 1 Backlight Function 166...
Страница 192: ...Chapter 14 Statement Reference 184 Example OPEN master Dat AS 1 FIELD 1 20 AS bar 10 AS ky CLFILE 1 CLOSE 1...
Страница 249: ...241 Example CLOSE IF kyIn Y THEN KILL Master Dat END IF Reference Statements CLFILE...
Страница 349: ...341 Run time errors Error code Meaning 05h Parameter out of the range checktype is out of the range...
Страница 383: ...375 Run time errors Reference Error code Meaning 05h Parameter out of the range Functions LEFT LEN and RIGHT...