Start Back Next End
  
ZBasic Language Reference
74
ZBasic Microcontrollers
Option.HeapSize
UnsignedInteger Indicates the specified or default heap size.
Option.Language
String
Specifies the language mode that is in effect.
Option.MainTaskStackSize
UnsignedInteger Indicates the specified size for the main task stack.
Option.Objects
Boolean
Indicates if object-oriented extensions are enabled.
Option.Overload
Boolean
Indicates if procedure overloading is enabled.
Option.PortPinEncoding
Boolean
Indicates port pin encoding is enabled.
Option.RTCEnabled
Boolean
Indicates if the RTC is enabled for the target device.
Option.Strict
Boolean
Indicates if Strict mode is in effect.
Option.StringSize
Integer
Gives the default string size for static string allocation.
Option.TargetCode
String
The type of code being generated (“ZVM” or “Native”).
Option.TargetDevice
String
The device for which code is being compiled, e.g. “ZX24a”.
Option.TargetFamily
String
The family to which the target device belongs, e.g. “ATtiny”,
“ATmega” or “ATxmega”.
Option.TargetIsZX
Boolean
Indicates if the target device is a ZX device.
Option.TargetMCU
String
Specifies the MCU used on the target device.
Option.TargetPackage
String
Specifies the package selected for a generic target device,
e.g. “DIP-40”.  For ZX devices it is an empty string.
Option.TimerIO
String
Specifies the timer used for IO on the target device.
Option.TimerRTC
String
Specifies the timer used for the RTC on the target device.
Option.TimerIO
String
Specifies the timer used for SW UARTs on the target device.
Pin.GreenLED
Byte
Gives the pin designator for the green LED (if available).
Pin.RedLED
Byte
Gives the pin designator for the red LED (if available).
Pin.YellowLED
Byte
Gives the pin designator for the yellow LED (if available).
System.JumpBufSize
Integer
Gives the size required for a buffer used for SetJmp().
System.MinQueueSize
Integer
Gives the minimum size for an array to be used for a queue.
Version.Major
Integer
Gives the major portion of the compiler version number.
Version.Minor
Integer
Gives the minor portion of the compiler version number.
Version.Variant
Integer
Gives the variant portion of the compiler version number.
Version.Value
UnsignedLong
Gives the composite value of the compiler version number. 
The value corresponding to v1.2.3 is &H010203.
Version.String
String
Gives the compiler version number as a string, e.g. “1.2.3”.  
With regard to the built-in constants referring to the version number, consider the version number v1.2.3. 
In this version number, the major value is 1, the minor value is 2 and the variant is 3.
Additionally, for each target device there exists a set of built-in pin name constants of the form
<port>.<bit> where <port> is a letter (case insignificant) referring to an I/O port and <bit> is a digit
in the range 0-7 referring to a bit of the port.  The value of the pin name is of type Byte and it may be the
pin number for the target device corresponding to that port bit or it may be an encoded port/pin designator
(as controlled by Option PortPinEncoding).  For example, when the target device is ZX24, the pin
name C.7 has the value 5 if Option PortPinEncoding is off.
3.9 Conditional Compilation Directives
The ZBasic compiler supports conditional compilation.  This means that you can add conditional
constructs to your code to specify that a portion of the code should be or should not be processed by the
compiler.  This is useful in order to create source code that can be compiled in different ways.  Such
flexibility can be used to create special versions of your application for different markets or for different
customers, etc.  It also provides a fast way to logically remove blocks of code from your program while
leaving the source code intact so that it can be easily restored.
A key element of conditional compilation is the ability to define special identifiers and to give them values. 
These identifiers can then be used in conditional expressions that control whether or not a block of code
will be processed normally by the compiler or ignored completely.  The compiler supports the definition of
conditional identifiers on the command line but you can also define them in your source code as well
using the following syntax:
Previous page Top Next page