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

Source

Switches

Description

ABS

AB

 

Absolute value. See Numeric Functions.

.ACCOUNT

A-Shell

X:2

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

ACS

AB

 

Returns arccosine.

ALLOCATE

AB

 

Allocate a random file.

AMOS

Plus

X:1

Execute AMOS commands as subroutines.

AND

AB

 

See Expressions.

.ARGCNT

A-Shell

X:2

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

.ARGSIZ

A-Shell

X:2

Returns the size of the specified argument.

.ARGTYP

A-Shell

X:2

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

ASC

AB

 

Returns numeric value of first character.

ASN

AB

 

Returns arcsine.

ATN

AB

 

Returns arctangent.

AUTO_EXTERN

A-Shell

X:2

Enables or disables the visibility of variables defined globally.

AUTOCAP

d/BASIC

 

"Intelligently" capitalizes the specified string.

BYTE

AB

 

BYTE(X) reads memory-mapped ports.

CALL

AB

 

Unstructured subroutine call.

CASE

Plus

X:1, RC

Label option within SWITCH.

CHAIN

AB

 

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$

AB

 

Returns the OEM or Latin1 character of specified string.

.CLEAR

A-Shell

X:2

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

CLOSE

AB

 

Close file.

CMDLIN

Plus

X:1

Retrieve command line.

COS

AB

 

Returns cosine.

DATA

AB

 

List of data elements with program.

DATE

AB

 

Returns system date.

.DATE

A-Shell

X:2

Returns date as a decimal number which displays as MMDDYY.

DATN

AB

 

Returns double arctangent

DEBUG

A-Shell

X:2

See TRACE and DEBUG Statements.

DEFAULT

Plus

X:1, RC

Default label option within SWITCH.

DEFINE

Plus

X:1, RC

Define a symbolic constant.

DEFSTRUCT

A-Shell

X:2

Define a structure.

DEFTYPE

A-Shell

X:2

Defines an alias for a data type.

.DEVICE

A-Shell

X:2

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

DIM

AB

 

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

DIMX

A-Shell

X:2

Enhanced dynamic array allocation.

DIVIDE’BY’0

Plus

X:1

Treat division by zero as zero rather than error.

DO

Plus

X:1, RC

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

Dot Variables

A-Shell

X:2

Read-only system variables.

DPRINT

A-Shell

X:2

Like PRINT but creates a static text control.

ECHO

Plus

X:1

Set terminal echo mode; same as XCALL ECHO.

EDIT$

Plus

X:1

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

++ELIF

 

 

Conditionals based on evaluating a constant expression.

ELSE

AB

 

Final alternative clause within an IF statement.

ELSEIF

A-Shell

X:2, RC

Intermediate alternative clauses an IF statement.

END

AB

 

Terminate execution of program.

ENDFUNCTION

A-Shell

X:2

Marks end of a function.

ENDIF

 

 

Terminates IF...ENDIF blocks.

ENDPROCEDURE

A-Shell

X:2

Marks end of a procedure.

ENDSTRUCT

A-Shell

X:2

End of a DEFSTRUCT ... ENDSTRUCT block.

ENDSWITCH

Plus

X:1, RC

End of SWITCH statement.

EOF

AB

 

Returns end-of-file status for file channel.

EQV

AB

 

Logical equivalence operator

ERF

AB

 

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

ERR

AB

 

Returns various err codes.

ERRMSG

Plus

X:1

Returns the text of the error message.

++ERROR

A-Shell

X:2

Force error within compilation.

$EXIT

A-Shell

X:2

Special exit label within function / procedure.

EXIT

Plus

X:1

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

EXITFUNCTION

A-Shell

X:2

Exit the current function.

EXITPROCEDURE

A-Shell

X:2

Exit the current procedure.

EXITPROGRAM

A-Shell

X:2

Exit the current function or procedure to label $EXITPROGRAM

EXP

AB

 

Natural log. See Numeric Functions.

.EXPERIENCE

A-Shell

X:2

See Dot Variables.

.EXTENT

A-Shell

 

Returns the "extent" of the subscript number.

++EXTERN

A-Shell

X:2

Exposes individual global variables.

FACT

AB

 

Factorial. See Numeric Functions.

.FALSE

A-Shell

X:2

See Dot Variables.

FILEBASE

AB

 

Set numeric offset for first file record.

FILL$()

Plus

X:1

Copies the given expression up to the specified length.

FIX

AB

 

Returns the integer part of the floating point value. See Numeric Functions.

FOR

A-Shell

X:2

See FOR … NEXT.

AB

 

FOREACH

A-Shell

X:2

Used to iterate through Ordered Maps.

FUNCTION

A-Shell

X:2

Begin definition of function.

GETKEY

Plus

X:1

Input a character.

GOSUB

AB

 

Same as CALL.

GOTO

AB

 

Jump to specified line number, label or variable.

GRIDMAP

A-Shell

X:2

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

IF

AB

 

Traditional form of IF statement.

Plus

X:1, RC

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

++IF

 

 

See Conditional Compilation.

IFE, IFE$

A-Shell

X:2

Shortcut for IF/THEN/ELSE statements.

IFELSE, IFEKSE$

A-Shell

X:2

 

++INCLUDE

AB

 

Include specified file at compile time; see INCLUDE.

A-Shell

X:2

INPUT

 

 

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

INSTR

AB

 

Substring search; see INSTR().

A-Shell

X:2

Extended version substring search; INSTR().

.INSTRR

A-Shell

X:2

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

INT

AB

 

Returns the largest integer less than or equal to xSee Numeric Functions.

IO

AB

 

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

.ISNULL

A-Shell

X:2

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

.JOBNAME

A-Shell

X:2

See Dot Variables.

.KEY

A-Shell

X:2

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

KILL

AB

 

Delete a file.

.LAST_LABEL

A-Shell

X:2

See Dot Variables.

.LAST_ROUTINE

A-Shell

X:2

See Dot Variables.

LCS$

AB

 

See String Functions.

LEFT$

AB

 

See String Functions.

LEN

AB

 

Returns length of a string. See String Functions.

LET

AB

 

Assignment statement.

.LINENO

A-Shell

X:2

See .LINENO, .PAGENO.

LOG

AB

 

Returns natural log. See Numeric Functions.

LOG10

AB

 

Returns decimal log. See Numeric Functions.

LOOKUP

AB

 

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

LOOKUP ("fspec")

 

 

Function version of LOOKUP statement.

LOOP

Plus

X:1, RC

See DO / WHILE / UNTIL.

MAP

AB

 

Variable declaration.

MAX

AB

 

See Expressions.

MEM

AB

 

See System Functions.

++MESSAGE

A-Shell

X:2

Output message during compilation. Also see ++ERROR.

MID$

AB

 

See String Functions.

MIN

AB

 

See Expressions.

MLIST

A-Shell

X:2

A bidirectional linked list.

.MONTH

A-Shell

X:2

See Dot Variables.

.NEST_LEVEL

A-Shell

X:2

See Dot Variables.

.NEXT

A-Shell

X:2

See Ordered Maps > Special ORDMAP Functions.

NO’DIVIDE’BY’0

Plus

X:1

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

NOECHO

Plus

X:1

Set terminal noecho mode. Same as XCALL NOECHO.

NOT

AB

 

See Expressions.

.NULL

A-Shell

X:2

See Ordered Maps > Special ORDMAP Functions.

NUMEXPR

 

 

Treat argument as numeric.

ODTIM()

Plus

X:1

See String Functions.

.OFFSET

A-Shell

X:2

Returns the offset to the specified member variable.

.OFFSIZ$

A-Shell

X:2

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

ON - GOSUB

AB

 

Call one of list of subroutines, based on value.

ON - GOTO

AB

 

Goto one of list of labels, based on value.

ON ERROR GOTO

 

 

Specify error handling routine.

OPEN

AB

 

Open file.

OPEN for APPEND

Plus

X:1

Enhancement to OPEN #CH, FSPEC, APPEND.

OR

AB

 

See Expressions.

ORDMAP

A-Shell

X:2

An associative array that maps keys to values

ORDMAPM

A-Shell

X:2

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

PAD

AB

 

See String Functions.

PAD()

A-Shell

X:2

Pad a string with spaces (function).

.PAGENO

A-Shell

X:2

See .LINENO, .PAGENO.

.PGMNAME

A-Shell

X:2

See Dot Variables.

.PGMVERSION

A-Shell

X:2

See Dot Variables.

POP

d/BASIC

 

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

++PRAGMAs

Plus

X:1

Compiler Directives.

PRINT

AB

 

Output variables and expressions to screen or file.

PROCEDURE

A-Shell

X:2

Start definition of a procedure.

PROGRAM

AB

 

Program header declaration.

RANDOMIZE

AB

 

Initialize Random Number Generator a randomly selected seed.

READ

AB

 

Read from file.

READL

AB

 

Read record and lock. See file access statements

READ'ONLY

 

 

File open mode modifier. See OPEN.

REDIMX

 

X:2

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

REPEAT

Plus

X:1, RC

Jump to top of loop structure to begin next iteration.

RESTORE

AB

 

Reset DATA access pointer to beginning.

RESUME

AB

 

Resume to line after last error.

RESUME WITH ERROR

A-Shell

X:2

Special version of resume used with functions and procedures.

RETURN

AB

 

Return from unstructured subroutine (see GOSUB, CALL).

A-Shell

X:2

Return value from XFUNC.

RIGHT$

AB

 

See String Functions.

RND

AB

 

Returns a random number. See Numeric Functions.

RND2

A-Shell

X:2

Returns a random number.See Numeric Functions.

RTRIM

AB

 

See String Functions.

SCALE

AB

 

Declare scaled arithmetic.

SGN

AB

 

Returns sign of a number. See Numeric Functions.

SIGNIFICANCE

AB

 

Set output/format significance of floating point values.

SIN

AB

 

See Trigonometric Functions.

.SIZEOF

A-Shell

X:2

Returns size of previously mapped variable.

SLEEP

Plus

X:1

Sleep for specified seconds. Same as XCALL SLEEP.

SPACE

AB

 

See String Functions.

SQR

AB

 

Returns square root of a number. See Numeric Functions.

SRND2

A-Shell

X:2

Initializes the random number generator. See Numeric Functions.

STEP

AB

 

Set loop counter increment. See FOR … NEXT.

STOP

AB

 

Program stop, wait for CR to continue.

STR$

AB

 

See String Functions.

STRSIZ

AB

 

Sets the default length of string variables.

STRIP

AB

 

See String Functions.

STRIP

Plus

X:1

Returns var with all trailing spaces removed. Also STRIP$(var).

STRSIZ

AB

 

Sets the default length of string variables.

SWITCH

Plus

X:1, RC

Conditional execution based on value of an expression.

TAB(X,Y,Z)

A-Shell

X:2

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

TAN

AB

 

See Trigonometric Functions.

.TERMINAL

A-Shell

X:2

See Dot Variables.

THEN

AB

 

Separates IF condition from statement. See IF.

TIME

AB

 

See System Functions.

TO

AB

 

See FOR … NEXT.

TPRINT

A-Shell

X:2

See Expressions.

TRACE

A-Shell

X:2

See TRACE and DEBUG Statements.

.TRUE

A-Shell

X:2

See Dot Variables.

UCS$

AB

 

See String Functions.

UNLOKR

AB

 

Release lock on file or record.

UNTIL

Plus

X:1, RC

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

.USERNAME

A-Shell

X:2

Evaluates to the user name.

USING

AB

 

See Expressions.

VAL

AB

 

Returns the decimal value of a string.

VXCALL

A-Shell

X:2

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

WEND

d/BASIC

/D

Same as ENDIF.

WHEN

d/BASIC

/D

Same as IF.

WHILE

Plus

X:1, RC

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

WORD

AB

 

WORD(X) reads memory-mapped ports.

WRITE

AB

 

Write to random file.

WRITECD

A-Shell

X:2

Output comma delimited values.

WRITEL

AB

X:1

Write record not previously locked.

WRITELN

Plus

X:1

Same as WRITEL but leave record locked.

WRITEN

Plus

X:1

Same as WRITEL but leave record locked.

WRITETD

A-Shell

X:2

Deprecated; see WRITECD.

XCALL

AB

 

Call external subroutine.

XFUNC

A-Shell

X:2

Call an external (SBX) function.

XGETARG(S)

A-Shell

X:2

Retrieve subroutine parameters.

XOPEN

A-Shell

X:2

Variation on OPEN statement fo ISAM-A.

XOR

AB

 

See Expressions.

XPUTARG

A-Shell

X:2

Return subroutine parameters.

XREAD, XWRITE, XUNLOKR

A-Shell

X:2

Allow record access via explicit record numbers.

.YYMMDD

A-Shell

X:2

See Dot Variables.