The /D switch extends the compiler support to include certain statements which are otherwise only available under the d/BASIC compiler (offered by d/Soft). Note that these comprise only a subset of the language extensions that d/BASIC supports. They were chosen for inclusion within A-Shell purely on the basis of user demand.
|
RTRIM(var) |
Strips the trailing blanks from the specified string variable |
|
AUTOCAP(var) |
“Intelligently” capitalizes the specified string. Note that the A-Shell implementation of this is rather minimal; users in need of more “intelligent” capitalization should refer to XFOLD.SBR. |
|
WHEN /WEND |
WHEN
<condition> Note that “WHEN” is treated as interchangeable with the BASIC Plus “IF” and “WEND” as interchangeable with “ENDIF”. |
|
"Dot" Variables |
All of the "Dot" variables originally from d/BASIC are now considered A-Shell Extensions, and are supported by the /X:2 compiler statement. See the table of Dot Variable in the previous section on A-Shell Extensions. |
|
Plus Extension |
|
|
Meaning |
|
|
A-Shell |
|
|
|
ALLOCATE |
AB |
File |
|
|
Plus |
|
Execute AMOS commands as subroutines | |
|
AMOS1 |
Plus |
|
|
|
BYTE(X) AND WORD(X) |
AB |
System |
|
|
BYTE(X), WORD(X), AND LONG(X) |
Plus |
|
|
|
CALL |
AB |
Gen |
|
|
CASE |
Plus |
|
|
|
CHAIN prog arg1 arg2... |
AB |
|
The ability to pass command line arguments in a chain statement is supported in all compiler modes by A-Shell. |
|
CLOSE |
AB |
File |
|
|
CLOSEK |
Plus |
|
|
|
Plus |
|
Retrieve command line | |
|
A-Shell |
|
| |
|
DATA |
AB |
Gen |
|
|
DATE |
AB |
System |
|
|
DEBUG |
A-Shell |
|
Control variable. If /DEBUG compile switch specified, acts as if it equals 1, otherwise 0. If /DEBUG switch is not specified, then it may still be activated at runtime by using SET DEBUG, or MX_DEBUG,op,debugvalue. Note that for backwards compatibility, mapping DEBUG explicitly as an ordinary variable will disable the control variable DEBUG. Also see DEBUG.xxxx below. |
|
DEBUG statements |
A-Shell |
|
|
|
DEFAULT |
Plus |
|
|
|
Plus |
|
Define a symbolic constant | |
|
A-Shell |
|
Allows you to assign a type name to a set of MAP statements and then use that as if it was a data type. | |
|
DIM |
AB |
Gen |
|
|
A-Shell |
|
Enhanced dynamic array allocation | |
|
DITOS(X) |
Plus |
|
|
|
Plus |
|
Determine how to handle divide by zero | |
|
Plus |
|
Repeat loop while (or until) a condition is (or becomes) true. | |
|
A-Shell |
|
Reserved-word functions. | |
|
A-Shell |
|
Read-only system variables. | |
|
DPRINT |
A-Shell |
|
Like PRINT but creates a static text control using the current default GUI (proportional) font and with the sunken attribute. (Note that if the /X:2 switch not specified, TPRINT is compiled as PRINT.) Intended for displaying data fields. |
|
DSTOI(X) |
Plus |
|
|
|
ECHO |
Plus |
|
|
|
Plus |
|
String editing function | |
|
ELSE |
AB |
Gen |
|
|
A-Shell |
|
One or more ELSEIF clauses may be inserted into an extended IF/ELSEIF/ELSE/ENDIF statement. | |
|
END |
AB |
Gen |
|
|
ENDSWITCH |
Plus |
|
|
|
EOF(X) |
AB |
File |
|
|
Err(X) |
AB |
|
|
|
ERRMSG(x) |
Plus |
|
Returns the text of the error message associated with the specified error number (from the SYS:ERRMSG.xxx file). |
|
ERRMSG(X) |
Plus |
|
|
|
ERROR <message> |
A-Shell |
|
Causes the message to be displayed and is treated as a compiler error. This is particularly useful in conjunction with conditional compilation, as shown in the preceding example. |
|
EXIT |
Plus |
|
May be placed inside of a DO...WHILE or FOR...NEXT loop to cause an immediate exit of the loop. |
|
FILEBASE |
AB |
File |
|
|
FILEBLOCK(X) |
Plus |
|
|
|
Plus |
|
Copies the given expression, partially or multiple times, up to the specified length. | |
|
FOR, TO, NEXT AND STEP |
AB |
Gen |
|
|
Plus |
|
Traditional loop structure using a loop counter. | |
|
Plus |
|
Input a character | |
|
GOSUB (OR CALL) AND RETURN |
AB |
Gen |
|
|
GOTO |
AB |
Gen |
|
|
Plus |
|
Specifying literal values in an alternate radix | |
|
Plus |
|
Integer variable type | |
|
IF / ENDIF |
Plus |
|
IF <condition>
THEN |
|
IF, THEN AND ELSE |
AB |
Gen |
|
|
A-Shell |
|
Nesting to 3 levels deep (instead of just 1) | |
|
INPUT |
AB |
File |
|
|
A-Shell |
|
Input comma separated values | |
|
INPUT LINE |
AB |
File |
|
|
INPUT RAW |
Plus |
|
Raw input, from file channel or keyboard, into X variables. |
|
A-Shell |
|
When the fourth parameter (flags) is specified (even if 0), the pattern is treated as a regular expression. | |
|
IO(X) |
AB |
System |
|
|
ISAM’INDEXED {‘EXCLUSIVE}, ISAMP’INDEXED {‘EXCLUSIVE} |
Plus |
|
These file type specifiers may be used in file OPEN statements to clarify if the file is to be handled as ISAM 1.0 or ISAM-A. See /I switch above. Note that this applies to AlphaBASIC 1.4 as well as BASIC Plus. |
|
KILL |
AB |
File |
|
|
LET |
AB |
Gen |
|
|
LOOKUP |
AB |
File |
|
|
LOOKUP (“fspec”) |
Plus |
|
Similar to LOOKUP but returns file size as value of expression. Note that a zero block file returns 0.5. |
|
LOOP |
Plus |
|
|
|
A-Shell |
|
PRIVATE and PUBLIC keywords for fine tuning scope of variables (MAP or DIMX). | |
|
MEM(X) |
AB |
System |
|
|
MESSAGE <message>
|
A-Shell |
|
Equivalent to ++ERROR <message> except that no error is generated. It is useful primarily for giving you visual feedback during compilation that your conditions are working as expected. See prior example. |
|
NEXT |
AB |
Gen |
|
|
NO’DIVIDE’BY’0 |
Plus |
|
|
|
NOECHO |
Plus |
|
|
|
NUMERIC FUNCTIONS 11-1 |
AB |
|
|
|
Plus |
|
Day / Time output conversion/formatting | |
|
ODTIM |
Plus |
|
|
|
ON - GOSUB (CALL) |
AB |
Gen |
|
|
ON - GOTO |
AB |
Gen |
|
|
ON CTRLC GOTO AND RESUME |
Plus |
|
|
|
ON ERROR AND RESUME |
AB |
Gen |
|
|
ON ERROR GOTO AND RESUME |
Plus |
|
|
|
ON GOSUB (CALL) |
Plus |
|
|
|
OPEN |
AB |
File |
|
|
Plus |
|
Enhancement to OPEN #CH, FSPEC, APPEND | |
|
A-Shell |
|
Pad a string with spaces | |
|
Plus |
|
Compiler directives. | |
|
|
AB |
File |
|
|
PRINT USING |
AB |
Gen |
|
|
A-Shell |
|
| |
|
PROGRAM |
AB |
Gen |
|
|
RANDOMIZE |
AB |
Gen |
|
|
READ |
AB |
File |
|
|
READ, RESTORE, AND DATA |
AB |
Gen |
|
|
Plus |
|
File open mode modifier | |
|
READL |
AB |
File |
|
|
A-Shell |
|
Re-dimensions an array originally created with DIMX. | |
|
RENAME |
Plus |
|
|
|
Plus |
|
Jump to top of loop structure to begin next iteration | |
|
RESTORE |
AB |
Gen |
|
|
RESUME |
AB |
Gen |
|
|
RETURN |
AB |
Gen |
|
|
A-Shell |
|
Return value from XFUNC | |
|
RNDN(X) |
Plus |
|
|
|
SCALE |
AB |
Gen |
|
|
A-Shell |
|
| |
|
SIGNIFICANCE |
AB |
Gen |
|
|
SIZEOF(VAR) |
A-Shell |
|
Used to reference the size of a previously mapped variable. For example: MAP1 VAR2,S,SIZEOF(VAR1) or X = Y * SIZEOF(Z). Note also that it is possible to use sizeof(var) to reference the size of the immediately preceding variable even when it is a structure. |
|
SLEEP |
Plus |
|
|
|
STEP |
AB |
Gen |
|
|
STOP |
AB |
Gen |
|
|
STRIP(var) or STRIP$(var) |
Plus |
|
Returns var with all trailing spaces removed. |
|
STRSIZ |
AB |
Gen |
|
|
A-Shell |
|
XCALL names may be up to 10 characters long. | |
|
Plus |
|
Conditional execution based on value of an expression. | |
|
SYSTEM FUNCTIONS 12-1 |
AB |
|
|
|
THEN |
AB |
Gen |
|
|
A-Shell |
|
Tab(x,y,z). | |
|
TIME |
AB |
System |
|
|
TO |
AB |
Gen |
|
|
TPRINT |
A-Shell |
|
Same as DPRINT but without the sunken effect. Also note that SET AUTOTPRINT causes all PRINT statements to behave at runtime as if they were compiled as TPRINT. |
|
A-Shell |
|
These statements open, print to, and close the debug message window. | |
|
Underlines in variable names |
A-Shell |
|
Variable names (and constants) may contain underlines. Although this has no special meaning, by convention it is used primarily with constants. |
|
UNLOKR |
AB |
File |
|
|
UNTIL |
Plus |
|
|
|
USING |
AB |
Gen |
|
|
VER$ |
Plus |
|
|
|
WHILE |
Plus |
|
|
|
WRITE |
AB |
File |
|
|
A-Shell |
|
Output comma delimited values | |
|
WRITEL |
AB |
File |
|
|
WRITELN |
Plus |
|
|
|
WRITETD |
A-Shell |
|
Deprecated; see WRITECD for important note. Old documentation: same as WRITECD, except that it outputs Tab delimiters instead of comma delimiters. |
|
XCALL |
AB |
Gen |
|
|
A-Shell |
|
Call an external (SBX) function | |
|
XGETARG, XGETARGS |
A-Shell |
|
Retrieve XCALL parameters. See XGETARG, XGETARGS, XPUTARG. |
|
XPUTARG |
A-Shell |
|
Return XCALL parameters. See XGETARG, XGETARGS, XPUTARG. |
|
A-Shell |
|
Allow record access via explicit record numbers. |