## Compiling directives

{CONSOLEFONT ON|OFF}

Forces console fonts (low resolution and high resolution) to be included in an application or to be removed.

Notes:

- The sizes of console fonts are 2598 bytes for the low resolution font and 4280 bytes for the high resolution font. So, setting this directive to OFF, your application may have a smaller footprint by about 7 Kbytes.
- See the SETFONT statement

{CREATORID t}

Sets application CreatorID (4 characters).

Notes:

- This directive is mandatory.
- As all Palm OS software, your application should have a unique 4 characters Creator ID. Please refer to the Palm OS website to get all information about this Creator ID "thing" and to register yours.

$ {DEFINE t}, {IFDEF t}, {IFNDEF t} and {ENDIF}

Conditional compiling directives

Allows you define specific labels ({DEFINE t}) and conditional compiling of source code blocks (from a {IFDEF t} or a {IFNDEF t} to a {ENDIF}) according to if the t label is defined ({IFDEF t}) or not ({IFNDEF t}).

Notes:

- Conditional compiling directives cannot be overlapping
- Only the 19 first characters of a t label are taken into account by iziBasic
- These directives are managed like full statements by the iziBasic compiler, so they cannot be put within a statement. Example:

  OK: {IFDEF "HaHa"} A=1 {ENDIF} {IFNDEF "HaHa"} A=2 {ENDIF}

  Not OK: A={IFDEF "HaHa"}1{ENDIF} {IFNDEF "HaHa"}2{ENDIF}

$ {INCLUDE t}

Include one source code into another one and have the iziBasic compiler parse the source codes accordingly. This is very convenient for adding a set of routines that you want to use in different development projects.

Note:

- One included source code file cannot itself include other source codes files. In other words, includes cannot be nested. So, only your top source code may include other files.

$ {KEYEVENTS ON|OFF|PARTIAL}

Defines whether you want to manage all hard buttons (of the device) events, none of them, or some of them in the DOEVENTS and WAITEVENT functions. By default, this directive is set to OFF.

Notes:

- Be careful that, when this directive is set, iziBasic overrides the normal behavior of these buttons presses, meaning that if you, for instance, press the Date Book hard button, exiting from iziBasic will not automatically launch the Date Book application.
- The PARTIAL parameter allows tracking all hard buttons except for the 4 buttons assigned to launching applications (by default: Address Book, Memo Pad...)
- In the case of the use of the CHAIN statement, this directive should be set in all source code blocks.
- See the explanations for the DOEVENTS function

{MINOSVERSION t}

Set the minimum Palm OS version (format "M.m", where M is Major and m minor) for your application to run. It cannot be smaller than "3.0". If it is set, at runtime your application will check if the target device meets this minimum OS requirement and quit smoothly with a message if it is not met.

Notes:

- This directive is optional. If not set, iziBasic will assume that it is worth "3.0".
- The iziBasic runtime checks the device’s Palm OS version and these instructions are executed only if the test is positive, otherwise they are ignored.
- You should test that your software made with iziBasic will work on all targeted devices, just like with all other development tools.

Warning: I cannot guarantee that all YOUR iziBasic developments will run smoothly from Palm OS 3.0 on. Indeed, iziBasic uses many Palm OS API calls (which are embedded for your convenience) that were introduced progressively over the Palm OS versions. I have identified in this manual the few instructions which require a minimum Palm OS version.

{PARSER ON|OFF}

Decide how you want to manage Mathematical parsing capabilities according to operations priorities in expressions. By default, this directive is set to OFF.

Notes:

- If PARSER compiling directive is set to ON: 1+2*3=7, this is 1+(2*3) or in other words, the operations are made according to the operations priority order. Within a given priority, operations are made from left to right.
- If PARSER is ON, you may also use parenthesis to force the order of operations in the variables assignment: (1+2)*3=9
- If PARSER compiling directive is set to OFF: 1+2*3 = 9, this is (1+2)*3 (this was the operational mode in previous releases of iziBasic) or in other words, the operations are made from left to right. Parenthesis cannot be used in this mode.
- PARSER compiling directive can be set and unset all along the source code, the last status is remembered for further variables assignments:

  {PARSER ON}
  A=1+2*3 ' A=7
  {PARSER OFF}
  B=1+2*3 ' B=9

- In terms of performance, iziBasic’s compiled code is smaller and faster when PARSER is set to OFF
- In the compilation report, the PARSER memory usage in the Numbers stack is reported in between brackets. Example: Number Size: 125[+21]/4000

$ {RESOURCEFILE [+] t}

Add a resource file to your program. This is, for instance, very useful to add images (of Tbmp type) which will then be used by the IMAGE and IMAGEBUTTON instructions.

Notes:

- This directive is optional.
- In your PRC file, the default images shipped with iziBasic are of Tbmp type and are numbered from 1 to 40. Please refer to the IMAGEBUTTON instruction to see the list of these 40 available images.
- The [+] optional parameter lets you decide if you want to include your resources in addition to the 40 images shipped with iziBasic. If not set, the 40 default images will not be included to your program.
- You may build your resource files with a third party software.

$ {SECUREFILES ON|OFF}

To avoid any risk of deleting important files on your Palm device, the OUTPUT, APPEND and RANDOM file modes of the files OPEN statement only work with databases having a "LDIB" Creator ID if this compiling directive is set to ON. If set to OFF, it can write to any database at runtime. If the database is to be created by OPEN, it will then be with the Creator ID of the application as defined by the CREATORID compiling directive.

By default, this directive is set to ON.

Notes:

- In the case of the use of the CHAIN statement, this directive should be set in all source code blocks.
- See the OPEN statement.

{VERSION t}

Sets application version.

Notes:

- This directive is optional.