ZBasic Language Reference
155
ZBasic Microcontrollers
code. See Section 6.8, Importing Identifiers from External Modules, for more details regarding importing
identifiers.
--include-path=<path-list>
With this option you can specify a list of directories in which the compiler will look for files included using
the #include directive, for Program Memory data initialization files and for files imported using the
#import directive. The <path-list> element consists of zero or more directory names, each
separated from the next by a semicolon. If any components of the directory name contain a space, the
entire list may have to be quoted depending on your computers operating system. Quoting is neither
required, nor supported, when this option occurs in a project file or arguments file. Note that the current
directory can be made part of the include path in the normal fashion by using a single period to represent
it.
Example
--include-path=..\includes;.;C:\projects\zbasic\files
This example specifies an include path with three components. When you use an include directive with a
non-absolute path like #include "lcd.bas", the first place that the compiler will look for lcd.bas is in
the includes sub-directory of the parent of the current directory. If it is not found there, the compiler will
next look in the current directory because of the presence of the period. Finally, the compiler will look in
the directory C:\projects\zbasic\files. If the file could not be located in any of the directories of
the path, an error message will be issued.
It is important to note that the #include_path directive in ZBasic source code will override the include
path specified by this option. Also, see the discussion of #include_path for information about some
special "macros" that can be used in the <path-list>.
--keep-files
This option requests that the compiler not delete the intermediate files that it creates during compilation.
This is only useful for native mode devices. Unless otherwise specified (using the -temp-dir option),
the intermediate files will be created in a subdirectory named zbTempDir in the same directory as the
project file.
--language=<language>
This option specifies the target language for the modules subsequently processed. The values that may
be specified for the <language> element are shown in the table below.
Language Option Values
Value
Description
BasicX
Compile using BasicX compatibility mode.
ZBasic
Compile using native mode (the default).
--list[=<file>]
This option requests that a listing file be generated and specifies the filename for it. For VM mode
devices, the listing file is similar to an assembly language listing, giving detailed information about the
code that was generated. If the equal sign and filename are omitted, the listing is output to stdout. For
native mode devices, the -list option causes an actual assembly listing to be produced (--keep-
files is also needed, q.v.) and in this case no filename should be specified. The listing file will have and
extension of .lss.
|