ASK item displays information about a computer environment


ASK #N: item displays information about properties of file #N.

See the reference manual for a list of allowed items.


CALL sub-name(arg1, arg2,..., argN) invokes the subroutine

headed by the SUB statement with the same name. CALL

arguments must match SUB parameters in number, type,

position, and number of dimensions.


CLEAR clears the screen or output window and resets the text

cursor to row 1, column 1; also switches to the full screen for



CLOSE #N closes the channel of a file, printer, or window

opened as #N. You must close a channel before you can open a

new channel with the same number.


DATA item1, item2,..., itemN stores string and numeric values

in memory where they can be accessed by a READ statement.

String values can be quoted or unquoted, items are separated by



DECLARE DEF func-name1, func-name2,..., func-nameN

names all external functions used in a program unit before their

first use.




DEF func-name(param1, param2,..., paramN) = expression

defines a single-line function. The expression may be numeric or

sting, in the latter case func-name must end with a $. See DEF

structure for more details.


DEF structure

DEF func-name(param1, param2,..., paramN)

<function body>



Arguments must match DEF parameters in number, type,

position, and number of dimensions. Functions are isolated

from other program units, changes in a parameter's value will

not change the value of the corresponding argument.


DIM array1(bounds), array2(bounds),..., arrayN(bounds)

establishes the size of each array and sets the bounds for each

dimension of that array; the bounds must be specified by

constants. Every array must be dimensioned by the DIM

statement before it is used in another statement.


DO structure

Do {|WHILE test|UNTIL test|}

<loop body>

LOOP {|WHILE test|UNTIL test|}

The DO statement (and the LOOP statement) can contain a

WHILE test or an UNTIL test or nothing.


END stops a program, it must be the last statement in the main

program unit; one and only one END statement is required.








Required as the last statement in a FUNCTION (same as DEF),

IF, SELECT CASE, SUB, or WHEN structure.


ERASE #N erases the contents of a file opened as channel #N.







Exits (jumps beyond) the inner-most DO, FUNCTION (or

DEF), FOR, OR SUB structure.


EXTERNAL must appear at the start of a LIBRARY file of

external procedures. It is optional as the first work in an external

procedure heading.


FOR structure

FOR control-variable = low-limit TO up-limit STEP val

<loop body>

NEXT control-variable

The control-variable must be a simple numeric variable. The

STEP clause is optional; if missing, the value is set to 1.


IF condition THEN simple-statement1 ELSE simple-statement2

executes simple-statement1 if the condition is "true", simple-

statement2 if the condition is "false." Condition must be a logical

variable or expression. The ELSE clause can be omitted.


IF structure

IF condition1 THEN


ELSEIF condition2 THEN


ELSEIF condition3 THEN





If condition1 is "true", only branch1 is executed; if condition2 is

"true", only branch2 is executed; if condition3 is "true", only

branch3 is executed; If all conditions are "false", branch4 is

executed. The ELSEIF and ELSE statements are optional, the

END IF statement is required.


INPUT var1, var2,..., varN displays a ? and waits for user

input. The input can be strings or numbers separated by



INPUT PROMPT string-constant: var1, var2,..., varN displays

the quoted string-constant and waits for user input.


INPUT #N: var1, var2,... accepts input from open text file #N

and assigns it to the variables. Commas act as separators

between groups of characters on the file, one group being

assigned to each variable.


LET variable = expression evaluates the expression and assigns

the value to the variable. Keyword LET not required if OPTION

NOLET has been executed.


LIBRARY quoted-string,..., quoted-string names the file or

files containing external procedures needed by the entire



LINE INPUT and LINE INPUT PROMPT are similar to the

INPUT statements. They accept only string values; all characters

up to the EOLN characters are assigned to a string variable.


LINE INPUT #N: var1, var2,... has features of both INPUT

#N and LINE INPUT. It accepts string values from open text

file #N, it assigns a separate line of characters from the file to

each variable.


LOCAL var1, var2,..., varN makes the named variables local to

the routine containing the statement, it is used mostly with

internal procedures and with the TYPO option.


LOOP statement, see the DO structure.


MAT REDIM array(bounds) redimensions the array to new

bounds; the new bounds can be specified by constants,

variables, or expressions.


OPEN #N: NAME pathname, ACCESS mode, CREATE mode

opens channel #N to a text file with name pathname; access

mode is "outin" (by default), "input", or "output"; create mode is

"old" (by default), "new", or "newold."


OPEN #N: PRINTER opens channel #N to the attached printer.




Sets the default unit (degrees or radians) for angle values and

variables in trigonometric functions.


OPTION NOLET allows you to write assignment statements

without the LET keyword, like "Y = Sin(X)" rather than "LET Y

= Sin(X)."


OPTION TYPO requires that all non-array variables used after it

be declared explicitly in LOCAL statements or appear as

parameters in procedure headings; this permits any variable not

so declared to be identified as a typo (a possible misspelling).


PAUSE sec stops the program for sec seconds and then



PRINT print-list displays items in a print-list on the screen,

these items must be separated bycommas or semicolons and

followed by a final semicolon. Commas separate items by a zone

width, semicolons place items close together, the final semicolon

suppresses the line feed and carriage return that normally occur

after a PRINT statement.


PRINT USING format-list: print-list displays items in a print list

on the screen, using the formatting instructions in the format list.

Items in the print list are separated by commas (these commas

have no affect on format) and may be followed by a final

semicolon. Common characters in the format-list are # and $.


PRINT #N: print-list

PRINT #N, USING format-list: print -list

These statements (producing the same results as the previous

PRINT statements) direct output to channel #N rather than to the

screen, the channel number refers to a file or the attached printer.


RANDOMIZE produces a new seed for the random number

generator, it cannot be executed more than once in a program.


READ var1, var2,..., varN assigns the next item in the DATA

list to its variables.


REM character-list adds a comment (the character-list) to a

program. An exclamation point (!) can be used in place of the

word REM.




These statements reset the file pointer to the beginning or end of

the file opened as channel #N.



RESTORE resets the data pointer to the beginning of the first

DATA statement.


SELECT CASE structure

SELECT CASE select-expression

CASE case-specifier


CASE case-specifier




CASE case-specifier





The SELECT CASE structure should have one or more CASE

parts and a CASE ELSE part. A case-specifier may have one or

more case-parts separated by commas. The allowed case-parts



constant TO constant

IS relational-operator constant

These constants must be the same type, numeric or string as the

select-expression. When the first case-specifier is satisfied, the

branch after it is executed and control passes to the END

SELECT statement. Satisfied means that the select-expression

equals a case-part (constant), the select-expression is within the

range of a case-part (constant TO constant), or the select-

expression makes a logical case-part true (IS relational-

expression constant). If no case-specifier is satisfied, the no-

match-branch after CASE ELSE is executed.


SET item value assigns a new value to a computer environment


SET #N: item value assigns a new value to a property of file #N.

See the reference manual for a list of allowed items.

STOP stops execution of the program.


SUB structure

SUB sub-name(param1, param2,..., paramN)

<subroutine body>


A SUB is executed when it is called by a CALL statement. The

arguments in this statement must match the SUB parameters in

number, type, position, and number of dimensions. When an

argument is a variable, any change in the value of the

corresponding parameter is passed back to the argument.


WHEN structure


<protected block>


<error-handling block>


The WHEN structure allows you to trap a runtime error in the

protected block of statements, prevent the program from

stopping and displaying an error message, and handle the error

with your own program statements in the error-handling block.