74 of 158
68 Name Type Description Module.Name String The name of the module being compiled. Option.Strict Boolean Indicates if Strict mode is in effect. Option.AllocStr Boolean Indicates if dynamic string allocation is in effect. Option.StringSize Integer Gives the default string size for static string allocation. Option.Base Integer Gives the array base value for the current module. Option.ExtRamEnabled Boolean Indicates if external RAM use is enabled. Option.HeapLimit UnsignedInteger Indicates the specified heap limit. Option.HeapSize UnsignedInteger Indicates the specified heap size. Option.Language String Specifies the language mode that is in effect. Option.MainTaskStackSize String Indicates the specified size for the main task stack. Option.TargetCode String Specifies the type of code being generated (“ZVM” or “Native”). Option.TargetDevice String Specifies the ZX device for which the code is being compiled. Option.CPUType String Specifies the CPU used on the target device. Option.CodeLimit UnsignedLong Specifies the code size limit (zero if none is specified). 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). 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. With regard to the built-in constants referring to the version number, consider the version number v1.2.0. In this version number, the major value is 1, the minor value is 2 and the variant is 0. 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 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.10 Exception Handling ZBasic implements a simple but effective form of exception handling using a concept borrowed from the C language. In the normal execution of a program, the call-return process is orderly and rigid. A routine can only return directly to the routine that called it. This forms a natural hierarchy that works well in most cases. However, it is sometimes the case that your program will detect a set of circumstances that preclude normal operation. In such cases, it is useful to be able to discard the normal call-return hierarchy and return directly to some distant caller, sending back a value to indicate the nature of the conditions that required the exceptional action. The simple example below shows how to utilize the exception handling mechanism. Dim jmpBuf1(1 to System.JumpBufSize) as Byte Sub Main() debug.print "start test" ' initialize the jump buffer