Updated November 2008
The following PRAGMAs are supported only when A-Shell Extensions are enabled (X:2 compiler switch).
|
A-Shell PRAGMA |
Description |
|
ALIGN2 |
Align MAP1 variables on 2 byte boundaries (default). See Alignment below. |
|
ALIGN4 |
Align MAP1 variables on 4 byte boundaries. See Alignment below. |
|
ALIGN8 |
Align MAP1 variables on 8 byte boundaries. See Alignment below. |
|
SBX |
Same as /X:3 (create an SBX instead of RUN) |
|
TRACK_LAST_ROUTINE <boolean> |
Updates .LAST_ROUTINE (see Dot Variables) each time a function or procedure is called. |
|
TRACK_LAST_LABEL <boolean> |
Updates .LAST_LABEL (see Dot Variables) each time execution passes a label in the program. |
|
AUTO_EXTERN <boolean> |
Used within User-defined Functions or Procedures to allow the use of global variables within the local routine. Also see Global/External Variables. |
The following PRAGMAs are supported in BASIC Plus mode (X:1 compiler switch).
|
BASIC Plus PRAGMA |
Description |
|
NO_LINE_NUMBERS <boolean> |
Same as /O |
|
ERROR_IF_NOT_MAPPED <boolean> |
Same as /M |
|
FORCE_24_BIT <boolean> |
Same as /A |
|
FORCE_EXT "ext" |
Force compiler output to use "ext" extension instead of .RUN. |
|
Allows you to change the name of the output file. | |
|
FORCE_IEEE <boolean> |
Forces a floating point variable which does not have an explicit size to be treated as F,8 (rather than F,6). Also requires /X:1 or higher. |
|
FORCE_OLD_ISAM <boolean>. |
This is the equivalent of /I, causing the compiler to assume ISAM 1.x for OPEN statements that are otherwise ambiguous. Unlike /I, it can be turned on and off for different sections of the source code. |
Valid replacements for the "boolean" argument are (not case sensitive): "YES", "TRUE", 1 or "NO", "FALSE", 0.
The following PRAGMAs from Alpha BASIC Plus are recognized but ignored by A-Shell because the associated function is not important or relevant under A-Shell. The important point is that by being recognized, they do not generate compile errors, thereby keeping your code (more) source-compatible with AMOS.
• FORCE_SBR_EXT (see FORCE_EXT and SBX)
• LIFESIGNS (hardly needed when compilation time is measured in milliseconds)
• ADD_EXTRA_STRWRK (A-Shell's string work area can use the entire memory partition)
• EXTRA_STRWRK
• SET_SETWRK
Alignment
Align MAP1 variables on 8 byte boundaries. Aligning on 4 or 8 byte boundaries may be more efficient on modern processors, and can be useful for matching data layouts originating in other languages (such as C). But beware of the effect this can have when using map overlays. For example:
MAP1 A1,S,5
MAP1 A2,S,5
MAP1 AX,S,16,@A1
Under the normal 2-byte alignment, A2 will start in the 6th position of the AX overlay. But with 4 byte alignment, it would start in the 8 position.
Subtopics