$OPTIONS Statement

Sets the compiler mode for the current code module. This changes the types, names and locations of the items generated by the BASIC command, or the Reality version to emulate at runtime.

Syntax

$OPTIONS [ compiler-option || reality-version ]

Syntax elements

compiler-option One of the following keywords, specifying the required compiler option:

EXEC.OBJBASIC generates an executable (platform-specific) item with the same name as the source item in the dictionary of the file. No deliverable (platform-independent) item is generated unless the DEL.OBJ option is also selected (in a separate $OPTIONS statement), or the (R option is used when running the BASIC command.

If you specify this option, you only need to catalog your program once. When you recompile, the executable item referenced by the command definition item is overwritten.

DEL.OBJBASIC generates a deliverable (platform-independent) item in the data section containing the source code in addition to the executable item (if any). This item has the same name as the source item, but with a $ (or £) prefix.

This option has no effect unless either the EXEC.OBJ option or the EXEC.BASIC.OBJ environment option is also selected.

If neither of these options is set, BASIC generates just a deliverable object (with a $ or £ prefix) in the data section.

reality-version One of the following keywords, specifying the required runtime version:

V9.0
V9.1
V10.0
V11.0
V12.0
V14.0
V14.1
V14.2
V15.0
V15.1
V15.2

The leading "V" may be in upper or lower case.

Comments

A separate $OPTIONS statement is required for each compiler option that you wish to set.

A separate $OPTIONS statement is required to set the Reality runtime version. You can change the runtime version as many times as you wish in your program module; each occurrence overrides the previous one, taking effect from that point on. In particular, you can make local changes to the runtime version, overriding that specified in a global include item.

The $OPTIONS statement also allows you to set the compatibility mode for the current code module. Refer to MultiValue Compatibility for details.

Unless used in an automatically included module, the effect of a $OPTIONS statement is local to the module in which it appears. If used in a subroutine, any previous $OPTIONS settings are restored on on return to the calling module.

Runtime version

The runtime behaviour of a DataBasic program or subroutine is determined by a combination of two factors:

There are several reasons why you might wish change these settings (for all your programs or for a particular code module). These include:

See also

BASIC command, EXEC.BASIC.OBJ environment option, $OPTIONS statement (MultiValue compatibility).