|Powered by QM on a Linux server|
KnowledgeBase 00082: Setting QMBasic Compiler Options
In its default form, QM follows the general concepts of the "Information style" products initially defined by Prime Information and subsequently adopted by PI/open and, to some extent, UniVerse/Unidata in their default modes.
This article summarises some of the features available to improve compatibility with other multivalue products.
The $MODE compiler directive enables various language features. Most of these can, if the developer wishes, be enabled for just part of a program module but it is more usual to apply mode settings over the entire program.
See the QM Reference Manual for full details of the mode settings. Some of the more important ones are:
This compiler directive makes string comparisons case insensitive. Unlike $MODE which can appear anywhere in a program, affecting compilation from that point forwards, $NOCASE.STRINGS must appear before the first executable statement and applies to the entire program.
The $BASIC.OPTIONS Record
Although the compiler directives described above could be inserted separately into each program module, QM provides an easy way to define the modes just once in a record named $BASIC.OPTIONS.
If there is a $BASIC.OPTIONS record in the file holding the program source, this record applies to all programs in that file.
If there is no $BASIC.OPTIONS record in the program source file but there is one in the VOC file, this is used to set compiler options.
In either case, use of
$MODE DEFAULTin the program source code will revert to the default option settings of the compiler.
The $BASIC.OPTIONS record has an X in field 1 to comply with VOC record formats. The remaining fields contain various options to control the behaviour of the compiler. The more important ones are: