ZBasic Language Reference
19
ZBasic Microcontrollers
Option Objects
Default: none
This option enables the ZBasic object-oriented extensions. If used, it must appear for the first time in the
first module compiled. If it does appear in the first module compiled then its presence in other modules is
silently ignored. This option implicitly enables subroutine/function overloads as well.
Example
Option Objects
Option Overload
Default: none
This option enables the definition of subroutine/function overloads. If used, it must appear for the first
time in the first module compiled. If it does appear in the first module compiled then its presence in other
modules is silently ignored. Note that this option is redundant if Option Objects is present.
Example
Option Overload
Option Namespaces
Default: none
This option enables the definition of namespaces. It may be used in any module and its occurrence
enables the definition of namespaces in that module and all subsequently processed modules.
Nevertheless, it is generally advisable to place it in the first module compiled. When this option is used,
the identifier Namespace becomes a keyword and cannot be used as a procedure or variable name.
Example
Option Namespaces
Option NameStyle <name-style>
Default: C
This option can be used to change the allowable format of a ZBasic identifer. There are two supported
name styles, Basic and c. Under the Basic name style, an identifier must begin with an alphabetic
character and thereafter contain only alphabetic and numeric characters and underscores. With the c
name style, the rules are expanded to allow an identifer begin with an underscore. The C name style is
supported primarily to allow accessing procedures and variables in code written in C and/or assembly
language in cases where the names begins with an underscore.
Example
Option NameStyle Basic
|