Please enable JavaScript to view this site.

A-Shell Reference

Notes on the "Source" column:

Says where this particular keyword was first used.
Abbreviations used: "AB" = AlphaBASIC; "Plus" = BASICplus.

Notes on "Switches:"

The column entry shows the compiler switch(es) required to enable this feature.
When more than one switch is listed, "or" is implied—i.e., just one of the switches is required.

Keyword

Switches

Category

Description

ABS

 

Numeric Function

Returns the absolute value of a number.

.ACCOUNT

X:2

Dot Variable

Returns the user’s current ppn (e.g. "100,22").

ACS

 

Trig Function

Returns arccosine.

ALLOCATE

 

File I/O Statement

Allocate a random file.

AMOS

X:1

Control Statement

Execute AMOS commands as subroutines.

AND

 

Operator

Logical AND.

.ARGCNT

X:2

Dot Variable

Number of parameters passed in the last function, procedure call, or SBX.

.ARGSIZ

X:2

System Function

Returns the size of the specified argument.

.ARGTYP

X:2

System Function

Returns type of specified argument passed to the current SBX, function, or procedure.

ASC

 

String Function

Returns numeric value of first character.

ASN

 

Trig Function

Returns arcsine.

ATN

 

Trig Function

Returns arctangent.

AUTO_EXTERN

X:2

 

Enables or disables the visibility of variables defined globally.

AUTOCAP

 

String Function

"Intelligently" capitalizes the specified string.

.BINDSTRUCT

X:2

Dyn Struct Function

Binds the specified DYNSTRUCT variable  to the structure definition.

BYTE

 

 

BYTE(X) reads memory-mapped ports.

CALL

 

Control Statement

Unstructured subroutine call.

CASE

X:1, RC

 

Label option within SWITCH.

.CCYYMMDD

X:2

Dot Variable

Returns current date in CCYYMMDD format.

CHAIN

 

 

Provides the ability to pass command line arguments. CHAIN <string expr> is supported in all compiler modes, including the ability to include command line arguments in the <string expr>, which must start with a program name, optionally followed by an arbitrary string of arguments, e.g. CHAIN "progxx /hard and /fast". Use CMDLIN or Xcall LSTLIN to retrieve the parameters in the target program.

CHR$

 

String Function

Returns the OEM or Latin1 character of specified string.

.CLEAR

X:2

Array Statement

Removes all the elements of the array without destroying the array itself.

CLOSE

 

File I/O Statement

Close file.

CMDLIN

X:1

 

Retrieve command line.

COS

 

Trig Function

Returns cosine.

DATA

 

General Statement

List of data elements with program.

DATE

 

System Variable

Returns system date.

.DATE

X:2

Dot Variable

Returns date as a decimal number which displays as MMDDYY.

DATN

 

Trig Function

Returns double arctangent

.DDMMYY

X:2

Dot Variable

Returns current date in DDMMYY format.

DEBUG

X:2

 

See TRACE and DEBUG Statements.

DEFALIAS

 

Compiler Directive

Allows aliases to be defined for the names of functions and procedures.

DEFAULT

X:1, RC

 

Default label option within SWITCH.

DEFINE

X:1, RC

Compiler Directive

Define a symbolic constant.

DEFSTRUCT

X:2

Compiler Directive

Define a structure.

DEFTYPE

X:2

Compiler Directive

Defines an alias for a data type.

.DEVICE

X:2

Dot Variable

Returns the user’s current device (e.g. "DSK0:").

DIM

 

 

Deprecated; use DIMX instead. Dimension an array at runtime.

DIMX

X:2

 

Enhanced dynamic array allocation.

DIVIDE’BY’0

X:1

 

Treat division by zero as zero rather than error.

DO

X:1, RC

Ctrl Struct Statement

Repeat loop while (or until) a condition is (or becomes) true.

Dot Variables

X:2

 

Read-only system variables.

DPRINT

X:2

 

Like PRINT but creates a static text control.

.DYNOFFSET

X:2

Dyn Struct Function

Returns the offset to the specified DYNSTRUCT member.

.DYNOFFSIZE

X:2

Dyn Struct Function

Same as .OFFSIZ$() except that it operates at run time instead of compile time.

ECHO

X:1

 

Set terminal echo mode; same as Xcall ECHO.

EDIT$

X:1

String Function

Returns a modified version of a string, based on option bits set in flags.

++ELIF

 

 

Conditionals based on evaluating a constant expression.

ELSE

 

Ctrl Struct Statement

Final alternative clause within an IF statement.

ELSEIF

X:2, RC

Ctrl Struct Statement

Intermediate alternative clauses an IF statement.

END

 

Control Statement

Terminate execution of program.

ENDFUNCTION

X:2

 

Marks end of a function.

ENDIF

 

Ctrl Struct Statement

Terminates IF...ENDIF blocks.

ENDPROCEDURE

X:2

 

Marks end of a procedure.

ENDSTRUCT

X:2

 

End of a DEFSTRUCT ... ENDSTRUCT block.

ENDSWITCH

X:1, RC

 

End of SWITCH statement.

EOF

 

System Function

Returns end-of-file status for file channel.

EQV

 

Operator

Logical equivalence.

ERF

 

System Function

Returns error/status information about the last operation on an ISAM file.

ERR

 

System Function

Returns various err codes.

ERRMSG

X:1

System Function

Returns the text of the error message.

++ERROR

X:2

 

Force error within compilation.

$EXIT

X:2

 

Special exit label within function / procedure.

EXIT

X:1

Control Statement

Exit from inner-most loop or block (DO, FOR, SWITCH).

EXITFUNCTION

X:2

Control Statement

Exit the current function.

EXITPROCEDURE

X:2

Control Statement

Exit the current procedure.

EXITPROGRAM

X:2

Control Statement

Exit the current function or procedure to label $EXITPROGRAM

EXP

 

Numeric Function

Returns the natural log of a number.

.EXPERIENCE

X:2

Dot Variable

See Dot Variables.

.EXTENT

 

 

Returns the "extent" of the subscript number.

++EXTERN

X:2

 

Exposes individual global variables.

FACT

 

Numeric Function

Returns the factorial of a number.

.FALSE

X:2

Dot Variable

See Dot Variables.

FILEBASE

 

File I/O Statement

Set numeric offset for first file record.

FILL$()

X:1

String Function

Copies the given expression up to the specified length.

FIX

 

Numeric Function

Returns the integer part of the floating point value.

.FN

X:2

Dot Variable

Alias for the variable holding the return value of a function. 

.FN'xxx

X:2

Dot Variable

Simplifies referencing the result of a previously called function.

FOR

X:2

Ctrl Struct Statement

See FOR … NEXT.

 

FOREACH

X:2

Ctrl Struct Statement

Used to iterate through Ordered Maps.

.FSTAT

X:2

 

Returns the file status for the last ISAM-A operation on the specified channel.

FUNCTION

X:2

 

Begin definition of function.

GETKEY

X:1

 

Input a character.

GOSUB

 

Control Statement

Same as CALL.

GOTO

 

Control Statement

Jump to specified line number, label or variable.

GRIDMAP

X:2

GRIDMAP

A variation of ordered map with two keys and one value.

IF

 

Ctrl Struct Statement

Traditional form of IF statement.

X:1, RC

Ctrl Struct Statement

Block-structured form of traditional IF statement; see IF … ENDIF.

++IF

 

Ctrl Struct Statement

See Conditional Compilation.

IFE, IFE$

X:2

Ctrl Struct Statement

Shortcut for IF/THEN/ELSE statements.

IFELSE, IFEKSE$

X:2

Ctrl Struct Statement

 

++INCLUDE

 

 

Include specified file at compile time; see INCLUDE.

X:2

INPUT

 

File I/O Statement

Input field(s) from keyboard or file; see INPUT.

INSTR

 

 

Substring search; see INSTR().

X:2

 

Extended version substring search; INSTR().

.INSTRR

X:2

String Function

Searches a string for a pattern, like INSTR(), but in reverse.

INT

 

Numeric Function

Returns the largest integer less than or equal to x.

IO

 

 

IO(X) pseudo reads from memory-mapped I/O port.

.ISDEF

X:2

Dyn Struct Function

Returns TRUE (-1) if the specified dynamic structure ds contains the specified member.

.ISEMPTY

X:2

String Function

Reports whether the specified string or unformatted expression is empty,

.ISNULL

X:2

 

Tests for the NULL condition. See Ordered Maps > Special ORDMAP Functions.

.JOBNAME

X:2

Dot Variable

Returns the jobname.

.KEY

X:2

 

Returns the key associated with the element currently indexed by the iterator.

KILL

 

File I/O Statement

Delete a file.

.LAST_LABEL

X:2

Dot Variable

See Dot Variables.

.LAST_ROUTINE

X:2

Dot Variable

See Dot Variables.

LCS$

 

String Function

See String Functions.

LEFT$

 

String Function

See String Functions.

LEN

 

 

Returns length of a string. See String Functions.

LET

 

 

Assignment statement.

.LINENO

X:2

File Function

Returns the current line # within the current page for sequential output files.

.LOCATION

X:2

Dot Variable

Returns the current program location counter.

LOG

 

Numeric Function

Returns the natural log of a number.

LOG10

 

Numeric Function

Returns the decimal log of a number.

LOCK

 

 

 

LOOKUP

 

 

Return size of file in blocks. See File-Related Functions.

LOOKUP ("fspec")

 

 

Function version of LOOKUP statement.

LOOP

X:1, RC

 

See DO / WHILE / UNTIL.

LSTRIP

 

String Function

Returns the specified string with leading blanks and tabs removed.

MAP

 

 

Variable declaration.

MAX

 

Operator

Maximum of two operands.

MEM

 

System Function

See System Functions.

++MESSAGE

X:2

 

Output message during compilation. Also see ++ERROR.

.MICROTIME

X:2

Dot Variable

Returns number of microseconds since midnight. 

MID$

 

String Function

Returns substring starting in position x and extending y characters or until end.

.MILLLITIME

X:2

Dot Variable

Returns number of milliseconds since midnight.

MIN

 

Operator

Minimum of two operands.

MLIST

X:2

Multi-level List

A bidirectional linked list.

.MMDDYY

X:2

Dot Variable

Returns current date in MMDDYY format.

MOD

 

Operator

Modulo.

.MONTH

X:2

Dot Variable

Returns the three character abbreviation for the current month.

.NEST_LEVEL

X:2

Dot Variable

Number of levels deep with nested function/procedure calls.

.NEXT

X:2

Ordmap Function

Advances the iterator, returning the associated key or .null if no more.

NO’DIVIDE’BY’0

X:1

 

Force divide by zero to generate error 10 (default). See DIVIDE'BY'0.

NOECHO

X:1

 

Set terminal noecho mode. Same as Xcall NOECHO.

NOT

 

Operator

Logical NOT.

.NULL

X:2

Dot Variable

See Ordered Maps > Special ORDMAP Functions.

NUMEXPR

 

 

Treat argument as numeric.

ODTIM()

X:1

String Function

See String Functions.

.OFFSET

X:2

System Function

Returns the offset to the specified member variable.

.OFFSIZ$

X:2

System Function

Returns the combination of the specified structure member's offset and size.

ON - GOSUB

 

 

Call one of list of subroutines, based on value.

ON - GOTO

 

 

Goto one of list of labels, based on value.

ON ERROR GOTO

 

Control Statement

Specify error handling routine.

OPEN

 

File I/O Statement

Open file.

OPEN for APPEND

X:1

 

Enhancement to OPEN #CH, FSPEC, APPEND.

OR

 

Operator

Logical OR.

ORDMAP

X:2

 

An associative array that maps keys to values

ORDMAPM

X:2

 

Same as ORDMAP but supports multiple keys of the same value.

PAD()

X:2

String Function

Pad a string with spaces (function).

.PAGENO

X:2

File Function

Return the current page number for sequential output files.

.PGMNAME

X:2

Dot Variable

See Dot Variables.

.PGMVERSION

X:2

Dot Variable

See Dot Variables.

POP

 

 

Deprecated. Pops the current GOSUB return address from the stack.

.POPBACK

X:2

Multi-level List

Remove last element from an MLIST.

.POPFRONT

X:2

Multi-level List

Removes first element from an MLIST.

++PRAGMAs

X:1

 

Compiler Directives.

PRINT

 

File I/O Statement

Output variables and expressions to screen or file.

PROCEDURE

X:2

 

Start definition of a procedure.

PROGRAM

 

 

Program header declaration.

RANDOMIZE

 

Numeric Function

Initialize Random Number Generator with a randomly selected seed.

READ

 

File I/O Statement

Read from file.

READL

 

 

Read record and lock. See file access statements

READ'ONLY

 

File I/O Statement

File open mode modifier. See OPEN.

.RECNO

X:2

File Function

Returns the current record number for the specified file channel.

.RECSIZ

X:2

File Function

Returns the record size for the specified open file channel.

REDIMX

X:2

Array Statement

Re-dimensions an array originally created with Dynamic Arrays (DIMX).

REPEAT

X:1, RC

Control Statement

Jump to top of loop structure to begin next iteration.

RESTORE

 

General Statement

Reset DATA access pointer to beginning.

RESUME

 

Control Statement

Resume to line after last error.

RESUME WITH ERROR

X:2

 

Special version of resume used with functions and procedures.

RETURN

 

Control Statement

Return from unstructured subroutine (see GOSUB, CALL).

X:2

 

Return value from XFUNC.

RIGHT$

 

String Function

Returns the rightmost x characters of a string.

RND

 

Numeric Function

Returns a random number.

RND2

X:2

Numeric Function

Returns a random number.

RTRIM

 

String Function

Returns string with trailing spaces removed.

.SBXNAME

X:2

Dot Variable

Returns name of current SBX or "" if not applicable.

.SBXVERSION

X:2

Dot Variable

Returns version string for current SBX or "" if not applicable.

SCALE

 

 

Declare scaled arithmetic.

SET'RECNO

X:2

File I/O Statement

Sets the record number of a file.

SGN

 

Numeric Function

Returns sign of a number.

SIGNIFICANCE

 

General Statement

Set output/format significance of floating point values.

SIN

 

Trig Function

See Trigonometric Functions.

.SIZEOF

X:2

System Function

Returns size of previously mapped variable.

SLEEP

X:1

General Statement

Sleep for specified seconds. Same as Xcall SLEEP.

.SORT

X:2

Multi-level List

Sort elements in MLIST by value.

SPACE

 

String Function

Returns a string of x spaces.

.SPLICE

X:2

Multi-level List

Splice elements from one MLIST to another.

SQR

 

Numeric Function

Returns square root of a number.

SRND2

X:2

Numeric Function

Initializes the random number generator.

STEP

 

 

Set loop counter increment. See FOR … NEXT.

STOP

 

 

Program stop, wait for CR to continue.

STREXPR

X:2

String String Function

Treats the expression argument as a string.

STR$

 

String Function

Convert a numeric value or expression to string.

STRSIZ

 

Compiler Directive

Sets the default length of string variables.

STRIP

X:1

String Function

Returns var with all trailing spaces removed. .

STRSIZ

 

Compiler Directive

Sets the default length of string variables.

SWITCH

X:1, RC

Ctrl Struct Statement

Conditional execution based on value of an expression.

TAB(X,Y,Z)

X:2

 

Extension of tab(x,y) with z indicating attributes to assign to the text.

TAN

 

Trig Function

See Trigonometric Functions.

.TERMINAL

X:2

Dot Variable

See Dot Variables.

THEN

 

Ctrl Struct Statement

Separates IF condition from statement. See IF.

TIME

X:2

System Function

See System Functions.

.TIME

X:2

Dot Variable

Returns current time in HHMMSS format.

TO

 

 

See FOR … NEXT.

TPRINT

X:2

 

See Expressions.

TRACE

X:2

 

See TRACE and DEBUG Statements.

TRIM

X:2

String Function

Returns the specified string with leading spaces and tabs removed.

.TRUE

X:2

Dot Variable

See Dot Variables.

UCS$

X:2

String Function

Returns a string folded to upper case.

UNDEF

 

Compiler Directive

Cancels (UNDEFines) a symbol created by a prior DEF... directive.

UNLOKR

X:2

File I/O Statement

Release lock on file or record.

UNTIL

X:1, RC

Ctrl Struct Statement

Repeat loop while (or until) a condition is (or becomes) true.

.USERNAME

X:2

Dot Variable

Returns the user name.

USING

 

Operator

Formatting by template.

VAL

 

 

Returns the decimal value of a string.

.VALX

X:2

String Function

Extended version of VAL.

VXCALL

X:2

 

Same as XCALL but uses a string expression for the subroutine name.

WEND

/D

 

Same as ENDIF.

WHEN

/D

 

Same as IF.

WHILE

X:1, RC

Ctrl Struct Statement

Repeat loop while (or until) a condition is (or becomes) true.

WORD

 

 

WORD(X) reads memory-mapped ports.

WRITE

 

File I/O Statement

Write to random file.

WRITECD

X:2

File I/O Statement

Output comma delimited values.

WRITEL

X:1

File I/O Statement

Write record not previously locked.

WRITELN

X:1

File I/O Statement

Same as WRITEL but leave record locked.

WRITEN

X:1

File I/O Statement

Same as WRITE but leave record locked.

WRITETD

X:2

 

Deprecated; see WRITECD.

XCALL

 

 

Call external subroutine.

XFUNC

X:2

General Function

Call an external (SBX) function.

XGETARG(S)

X:2

General Statement

Retrieve subroutine parameters.

XOPEN

X:2

File I/O Statement

Variation on OPEN statement fo ISAM-A.

XOR

 

Operator

Logical XOR; exclusive OR.

XPUTARG

X:2

General Statement

Return subroutine parameters.

XREAD, XWRITE, XUNLOKR

X:2

File I/O Statement

Allow record access via explicit record numbers.

.YYMMDD

X:2

Dot Variable

See Dot Variables.