BASIC Statements

The following BASIC statements are presented:

! Statement

Indicates that the text following the ! is a comment.

* Statement

Indicates that the text following the * is a comment.

$chain Statement

Continues FlashBASIC or BASIC compilation in a different source item.

$include Statement

Inserts FlashBASIC or BASIC code from a separate item (known as an include item) to be compiled as part of the object module of the current program or subroutine.

$options Statement

Sets compatibility options for the FlashBASIC or BASIC compiler.

abort Statement

Immediately stops program execution and unconditionally returns to the TCL command prompt.

aux Statement

Enables or disables spooling to the auxiliary port.

begin case Statement

Starts a case construct.

begin work Statement

Starts a transaction.

break Statement

Enables or disables the BREAK key.

call Statement

Transfers control to an external FlashBASIC or BASIC subroutine and optionally passes a list of arguments to it.

case Statement

Delineates a conditional case construct.

casing Statement

Toggles case sensitivity relative to input data and string comparisons in the current program and any called subroutines.

cfunction Statement

Provides access to C libraries from BASIC.

chain Statement

Transfers processing control to TCL, which interprets and executes the statement defined in the expression.

clear Statement

Sets all local and common variables to 0 in a main program.

cleardata Statement

Clears the data stack.

clearfile Statement

Deletes all items in the specified file variable previously opened with an open statement.

clearselect Statement

Clears the active select-list specified by the list variable and releases all overflow associated with that list.

close Statement

Closes the file identified by the file variable.

commit work Statement

Commits a transaction.

common Statement

Declares data elements to share among different FlashBASIC or BASIC modules.

compare Statement

Compares two dynamic arrays.

continue Statement

Restarts a loop that is under for...next or loop...repeat control.

convert Statement

Searches a given variable and replaces each occurrence of a character by another.

crt Statement

Outputs unconditionally to the terminal display, regardless of whether or not the printer on condition is in effect.

data Statement

Queues responses for use by subsequent input requests initiated from chain, enter, execute, or input statements.

debug Statement

Temporarily suspends execution of a FlashBASIC or BASIC program and invokes the FlashBASIC or BASIC debugger.

del Statement

Provides an alternate to the delete() function for deleting a location from a dynamic array.

delete Statement

Removes a specific item from a file.

dimension Statement

establishes a specific number of storage locations for a matrix of variables.

echo Statement

Toggles terminal echo on or off.

end Statement

Indicates both the end of a series of statements executed conditionally from a then or else condition or the physical end of the program.

end Case Statement

Terminates case construct.

enter Statement

Transfers control to another cataloged FlashBASIC or BASIC program.

equate Statement

A compiler directive that declares a constant at compile time or a synonym of another variable or array element.

error Statement

Displays the error message from the messages file and continues execution of the program.

execute Statement

Temporarily pushes a level and performs any valid TCL expression, then continues execution of the FlashBASIC or BASIC program.

execute Statement (UNIX)

Executes a UNIX command from within a FlashBASIC or BASIC program.

exit Statement

Forces an early exit from a loop that is under for...next or loop...repeat control.

file Statement

A compiler directive that allows the use of attribute definition items in the file’s dictionary while compiling a program.

filelock Statement

Sets an exclusive lock on an entire file.

fileunlock Statement

Releases an exclusive lock set by the filelock statement on an entire file.

footing Statement

Designates a text string composed of literals and special options to output at the bottom of each page.

for...next Statement

An iterative, incremental loop statement used to repeat a sequence of statements for a specific number of occurrences.

get Statement

Gets raw characters from the specified port.

getx Statement

Receives input from an attached line in ASCII hexadecimal format and returns an exploded ASCII hexadecimal string that allows binary data to contain a decimal 255 (x’ff’).

gosub Statement

Transfers control to a local subroutine identified by a statement label within the program.

goto Statement

Transfers control to the location in the FlashBASIC or BASIC program that begins with the given statement label.

heading Statement

Designates a text string composed of literals and special options to output at the top of each page.

if Statement

Tests the result of a logical expression. Depending on whether the expression evaluates to either true or false, the statements following the then or else clauses respectively are executed.

ifr Statement

Tests the result of a logical expression.

in Statement

Accepts a single raw character of input from the keyboard, without displaying a prompt character or requiring pressing ENTER following the input.

input Statement

Temporarily suspends execution of the program until a response is provided from the keyboard and assigns that response to a specified variable.

inputclear Statement

Clears the keyboard type-ahead buffer.

inputctrl Statement

Toggles on and off the ability to enter control characters on succeeding BASIC input statements.

inputerr Statement

Displays a message on the status (bottom) line of the terminal. it meant to be used with the input@ statement.

inputerr Statement (Windows)

Displays a dialog box (allowing the user to specify the title, text, and buttons), then waits for input. Upon return, the system(0) function returns a numeric code indicating the user choice.

inputnull Statement

Used with the input @ statement to define the character used to indicate a null input on subsequent input statements.

inputparity Statement

Enables or disables the extended character set (xcs) for the current process.

inputtrap...gosub Statement

Sets up an automatic computed gosub based on the next input @ statement data.

inputtrap...goto Statement

Sets up an automatic computed goto based on the next input @ statement’s data.

inputtrap off Statement

Cancels the previous inputtrap statement.

ins Statement

An alternative to the insert() function for inserting a string expression into a dynamic array.

key Statement

Locates an item using a B-tree index key, and returns the item in a variable, providing the ability to sequentially search the items in the file based on the index.

let Statement

Assigns the value of an expression to a variable.

locate Statement

Searches for the location of a specific string expression and returns the location in the position variable.

lock Statement

Sets one of 64 execution locks, in the range from 0 through 63.

loop Statement

Repetitively executes (loops) until an ending condition is met.

mat Statement

Assigns data to each element of a dimensioned array variable to a specific value in one operation.

matbuild Statement

Converts a dimensioned array into a dynamic array.

matparse Statement

Converts a dynamic array into a dimensioned array.

matread Statement

Reads the specified item from the optionally specified file variable or, if not specified, the default file variable, and stores one attribute per element in the dimensioned array.

matreadu Statement

Tests if an item is already locked and locks the item if it is not.

matwrite Statement

Writes an item into the specified file variable.

matwriteu Statement

Identical to the matwrite statement, except the item remains locked.

next Statement

Occurs at the end of a for...next construct and causes the iteration counter to increment and branches to the corresponding for statement to decide whether to terminate.

null Statement

Performs no operation, other than to provide an instruction where one is required. This is usually used for program readability.

on...gosub Statement

Transfers control to a local subroutine designated by a specific statement label according to the positional value returned by the expression.

on...goto Statement

Transfers control to the line within the FlashBASIC or BASIC program that begins with the specified statement label, according to the positional value of the expression referenced by the expression.

open Statement

Opens a specified file name and associates the file with the optional file variable.

out Statement

Outputs a single ASCII character derived from a numeric expression in the range of 0 through 255, which indicates its corresponding position in the ASCII table.

page Statement

Terminates the current page of output, prints the optional footing, positions to the top of the form, and prints the optional heading.

precision Statement

Defines the number of fractional decimal places that a numerical value can hold.

print Statement

Directs output of an expression to the current output device.

print on Statement

Directs output to one of 32,767 open print files.

printchar Statement

Prints the first character of the string expression to the screen or to the printer.

printer Statement

Controls the output from subsequent print, heading, footing, or page statements.

procread Statement

Reads the calling Proc’s primary input buffer and assigns its contents to a specified variable.

procwrite Statement

Writes a string expression variable to the calling Proc’s primary input buffer.

program Statement

Optionally used on the first line of a program to indicate that this is a program.

prompt Statement

Indicates the single character to display during subsequent input statements that prompt for input from the keyboard.

read Statement

Reads an item as a dynamic array and stores the item as a string.

readnext Statement

Retrieves the next item-ID from an active list and assigns it to a specified variable.

readt Statement

Reads a tape record and assigns the value returned to a specified variable.

readtx Statement

Reads a tape record converts the tape record to hexadecimal and assigns the resulting hexadecimal value to a specified variable.

readv Statement

Reads an item from the optionally-specified file variable and assigns the value contained in the attribute number referenced in the attribute expression to the specified variable.

release Statement

Clears locks on items locked with a previous matreadu, readu, or readvu statement.

rem Statement

Designates that all text that follows the statement on the same line is ignored by the compiler.

remove Statement

Retrieves a substring delimited by a system delimiter from a dynamic array.

repeat Statement

Defines the end of a loop. See loop Statement for more information.

replace Statement

Maintains referential integrity between items that contain bidirectional bridges used by the Update Processor by eliminating duplicate item-IDs.

return Statement

Terminates an internal or external subroutine and returns execution control to the statement following the invoking call or gosub statement.

rewind Statement

Rewinds the currently attached magnetic tape unit to the beginning of the tape.

rollback work Statement

Rolls back (or undoes) a transaction.

root Statement

Provides an interface to the B-tree indexes for subsequent references with the key statement.

rqm Statement

Suspends processing for a specific number of seconds, or until a specific time.

select Statement

Creates an active list of item-IDs, allowing sequential access to each item in the file by use of the readnext statement.

send Statement

Sends output to a specified port.

sendx Statement

Converts the exploded ASCII hexadecimal string results of a specified string expression to its binary equivalent and then transmits it to the specified port.

sleep Statement

Places a process to sleep for a specific number of seconds, or, until a specific time.

spoolq Statement

Enables or disables the spooler entry number message.

stop Statement

Stops program execution and returns to the invoking the process.

subroutine Statement

Defines a program as an external subroutine.

ta Statement

Toggles or resets the type-ahead buffer.

tcl Statement

Executes any valid TCL command as a subroutine.

tclread Statement

Loads the TCL command used to activate the program into a variable.

transaction Statement

Enables or disables participation in a transaction.

transaction abort Statement

Aborts a transaction.

transaction cache Statement

Enables or disables the transaction read cache.

transaction commit Statement

Commits a transaction.

transaction flush Statement

Enables or disables the transaction flush mechanism.

transaction rollback Statement

Rolls back a transaction.

transaction start Statement

Starts a transaction.

unlock Statement

Resets an execution lock, in the range 0 to 63, previously set with a lock statement.

weof Statement

Writes an eof (end of file) mark to the currently attached magnetic media.

write Statement

Writes the item specified in the dynamic array variable into the specified file, using the item-ID specified in the ID expression.

writet Statement

Writes a tape record to the attached magnetic media from the specified variable.

writeu Statement

Writes a dynamic array into the specified file variable and keeps items locked that were locked by a previous readu or readvu statement.

writev Statement

Writes the value of an expression into the attribute designated in the attribute expression parameter, using the item-ID specified in the ID expression.

writevu Statement

Identical to writev, except that the item remains locked.

writex Statement

Writes the item specified in the dynamic array variable into the specified file, using the item-ID specified in the ID expression.