Futurebasic/Language/Reference/compile

= COMPILE statement =

Statement
✔ Appearance ✔  Standard ✔  Console

Description
While it is possible to place your own compile statements in source code, this is better accomplished by selecting items in the editor's preference window. Placing  statements in source code will void most of the selections made in the editor.

The  statement is used to change the way a program is compiled. The statement is optional: if you use it, it should not appear more than once in your program's source code, except possibly within different branches of a  block. It is a non-executable statement, so you can't change its effect by putting it inside a conditional execution structure such as. However, you can conditionally include or exclude it from the program by putting it inside a  block.

Typically, the  statement is the first statement in the program.

sets the preferred number of ticks to occur between operating system calls.

is a list of one or more symbolic constant names (separated by spaces) chosen from the set described below. can also consist of a single integer constant equal to the sum of the individual symbolic constants.

Description Default

Allocate a pointer in the application heap for variables (applies only when compiling a code resource). Allocate a handle in the application heap. Allocate a handle in the System heap for variables (applies only when compiling a code resource). Allocate a handle in the application heap. Generate information necessary for MacsBug to display your programÕs labels and function names. This is a useful feature for debugging, but makes your compiled code slightly larger. No MacsBug information is generated. Store all string constants found in the program as STR# resources. No STR# resources are created. Generate an error if any variable is encountered before it is explicitly declared with a  statement. No  req'd for non-array, nonrecord vars (implicitly declared by appearance in code). Generate an error if a  statement contains a variable that was previously encountered in the same scope (possibly in a previous   statement). Any  with a previously encountered variable is ignored. Prevents the compiler from removing duplicate strings when creating STR# resources in an application. This only applies if the  flag is also set. Compiler removes duplicate strings. Instructs the compiler to override the options specified in ÒPreferencesÓ dialog when compiling this program (see the next table). The current ÒPreferencesÓ options are used. Add custom CDEF resource (for Geneva 9-point text or window text) to compiled applications. DonÕt add the resource. Add custom MDEF resource (for Geneva 9-point menu text) to compiled application. DonÕt add the resource. Add custom WDEF resource (for windoid-style palettes) to compiled application. DonÕt add the resource. Generates an error if references to Toolbox procedures are not preceded by the  keyword. keyword is optional. In Toolbox procedure references, the  keyword is optional. This is the same as the default. keyword is optional.

Example
The following example tells the compiler to generate program labels and function names for MacsBug, and to require that all variables be explicitly declared. Tickcount is ignored if the code is used in an application.