The /X:1 switch (or equivalently, COMPLP) extends the compiler support to include certain statements which were originally implemented by BASIC Plus under AMOS; these are listed below. Refer to the A-BASIC PLUS User's Manual for more details on these language features.
Note that although A-Shell supports these BASIC Plus language extensions in source code, in no way does it support the .RP (compiled BASIC Plus) file format. Instead, it compiles them as non-standard extensions to the .RUN format, and any such .RUN files will not be compatible with RUN.LIT or RUNP.LIT under AMOS. Thus, if you choose to use these language extensions and want to run them under both A-Shell and AMOS, you will have to recompile the source on both platforms.
The /RC (Run Compatible) on COMPIL, when used in place of the /X:1 or /X:2 switch, allows many of these extensions to be compiled into a RUN format that remains compatible with AMOS. In the following table, the "/RC?" column says whether, when compiling with the RC switch, use of this statement or feature will produce a run file that is run compatible ("RC") with AMOS. NOTE: THIS PARAGRAPH is repeated in A-Shell Extensions. If you change it here, re-copy/paste there.
Extension |
/RC? |
Meaning |
|
Execute AMOS commands as subroutines | |
|
Retrieve command line | |
Yes |
Define a symbolic constant | |
|
Cancels (undefines) a symbol created by a prior DEFINE or DEFALIAS directive | |
|
Determine how to handle divide by zero | |
Yes |
Repeat loop while (or until) a condition is (or becomes) true. | |
|
String editing function | |
ERRMSG(x) |
|
Returns the text of the error message associated with the specified error number (from the SYS:ERRMSG.xxx file). |
EXIT |
Yes |
May be placed inside of a DO...WHILE or For ... Next loop to cause an immediate exit of the loop. |
|
Copies the given expression, partially or multiple times, up to the specified length. | |
Yes |
Traditional loop structure using a loop counter. | |
|
Input a character | |
Hex, Octal, ASCII Values |
Yes |
Specifying literal values in an alternate radix |
I variable type |
|
Integer variable type |
IF / ENDIF |
Yes |
IF <condition>
THEN |
|
Raw input, from file channel or keyboard, into X variables. | |
ISAM’INDEXED {‘EXCLUSIVE}, ISAMP’INDEXED {‘EXCLUSIVE} |
Yes |
These file type specifiers may be used in file OPEN statements to clarify if the file is to be handled as ISAM 1.x or ISAM-A. See /I switch above. Note that this applies to A-BASIC 1.4 as well as BASIC Plus. |
LOOKUP ("fspec") |
|
Similar to LOOKUP but returns file size as value of expression. Note that a zero block file returns 0.5. |
|
Day / Time output conversion/formatting | |
OPEN for APPEND |
|
Enhancement to OPEN #CH, FSPEC, APPEND |
PRAGMAS |
|
See ++PRAGMAs in A-Shell Extensions. |
READ'ONLY |
|
File open mode modifier |
Yes |
Jump to top of loop structure to begin next iteration | |
STRIP(var) or STRIP$(var) |
|
Returns var with all trailing spaces removed. |
|
Yes |
Conditional execution based on value of an expression. |