Page 20 of 229 Start Back Next End ZBasic Language Reference 10 ZBasic Microcontrollers Port Configuration Designators Configuration Character Meaning T The corresponding bit should be a tri-state input (pull-up disabled). P The corresponding bit should be an input with the pull-up enabled. 0 The corresponding bit should be an output set to logic zero. 1 The corresponding bit should be an output set to logic one. Note that it is not necessary to configure your ports using this option directive. The configuration may also be done using the System Library subroutine PutPin() or built-in registers like Register.DDRA. Also, note that if you specify configuration directives for both the pins and the port containing them, the last occurring directive will prevail. Example Option PortA "TPTP0001" Option Base Option Base <v alue> Default: 0 When an array is defined, the lower bound for each dimension may be specified explicitly (the recommended practice) or it may be omitted. In the latter case, the compiler will utilize the default lower bound which you can select using the Option Base directive. The <value> element of the directive must be either 0 or 1. It is important to note that this directive has local scope, i.e., it only affects arrays defined in the module in which the directive appears. This option does not affect arrays defined without either the upper bound or the lower bound specified (e.g. a Program Memory data item, an array that is a parameter to a procedure, a based array, or a ByRef array). In these cases, the lower bound is always assumed to be 1. Example Option Base 1 Option Explicit Option Explicit Default: Off Traditionally, the purpose of the Option Explicit directive has been to require that each variable in the program be explicitly defined. Historically, early Basic dialects allowed programs to be written so that when the compiler encountered a new variable name, it automatically created a definition for it. Although this may have been thought to be a nice feature, it turned out to be the source of many programming errors and bugs. If you accidentally misspelled a variable name, a new variable was created entirely unbeknownst to you. Because of this serious drawback implicit variable definition is not supported by ZBasic. The Option Explicit directive is accepted by the compiler for compatibility reasons but neither its presence nor its absence affects any aspect of the compiler’s operation. Option Language Option Language { BasicX | ZBasic } Default: ZBasic By default the compiler processes modules using the rules and defaults for the ZBasic language. This option directive can be used to instruct the compiler to process the module using the syntax rules defined by a specific language variant. If Option Language BasicX is specified, the compiler will process the module in BasicX compatibility mode. This may be useful in certain peculiar situations if you have