Summary of Statements

From BR Wiki
Jump to navigation Jump to search

A brief description of each statement along with its shortest allowable abbreviation. See each statement individually for more information.

CHAIN (CH) Ends the current program and starts execution of another program, procedure, or sub-procedure; allows variables to retain their current values.

CLOSE (CL) Deactivates an open file.

CONTINUE (CO) Used at the end of an error processing routine to transfer control to the first executable statement following the statement causing the error (see also RETRY).

DATA (DA) Creates an internal table of numeric and string constants that is used by READ to assign values to variables.

DEF Defines a single or multiple line numeric or string function to be evoked from elsewhere in the program.

DELETE (DEL) Marks a specified record as unavailable.

DIM (DI) Defines the size of arrays or matrices, and the maximum length of string variables.

DO Begins a circular set of program lines.

ELSE (EL) Works in conjunction with IF to transfer control or execute statements on the basis of a conditional expression.

END DEF Used the same as FNEND to end the definition of a multi-line function, and can be interchanged with FNEND.

END IF (EN IF) Works in conjunction with IF to transfer control or execute statements on the basis of a conditional expression.

END (EN) Ends a program and closes all files. (Must be on the last line of the program.)

EXECUTE (EXE) Causes a string to be compiled and executed as if it were a command or statement entered from the keyboard.

EXIT DO Breaks out of a DO LOOP circular pattern if executed in the middle of the loop

EXIT (EXI) Transfers control to the indicated line when an unspecified error occurs.

FNEND (FN) Indicates the end of the definition of a multi-line function.

FOR Begins a loop, initializes the loop-counting variable, specifies when the loop will be terminated, and makes first test.

FORM Formats output or input for both display and internal files, and print and input fields.

GOSUB (GOS) Unconditionally transfers program control to a subroutine.

GOTO (GOT) Unconditionally transfers program control to another line number or label.

IF Transfers control or execute statements on the basis of a conditional expression.

INPUT FIELDS (IN F) Allows format-controlled data entry from the keyboard; redisplays the data as each field is exited.

INPUT SELECT (IN S) Sets up a menu selection screen and accepts selection input.

INPUT (IN) Inputs data from a record, screen, window or other device and assigns values to specified variables.

LET (LE) Evaluates a numeric or string expression and optionally assigns the value of the expression to one or more variables.

LINPUT (LI) Inputs data from a record, screen, window or other device and assigns an entire record to a string variable.

LOOP Ends a circular set of program lines and causes the loop to circle again if the expression is true.

MAT (M) Performs matrix operations including increasing or decreasing dimensions or number of elements; adding or subtracting two matrices; adding, subtracting, multiplying, or dividing a number into all elements of a matrix; and sorting into ascending or descending order.

NEXT (N) Calculates the next value of the loop counting variable and tests whether or not execution of the loop should continue.

ON ERROR Requests the system to transfer control to the operator, to another program line, or to ignore the error when a specified error condition occurs.

ON GOSUB (ON GOS) Conditionally transfers control to one of a list of subroutines.

ON GOTO (ON GOT) Conditionally transfers control to one of a list of lines.

Open Display (OPE) Activates a display file for input or output.

Open External(OPE) Activates an external file for input or output.

Open Internal (OPE) Activates an internal file for input or output.

Open Window (OPE) Activates a window file for input or output.

OPTION (OPT) Defines the programmer's choices for three available options. Arrays may start with zero or one; sorts may handle either letters or numbers first; decimals and commas may be printed in the standard American format, or they may use the inverted European style.

PAUSE (PAU) Interrupts program execution and allows the operator to enter system commands, print variables, change variables, and edit program lines, then resume execution from the same line or a different line. (Type any form of the GO command to restart execution.)

PRINT BORDERS (PR B) Specifies a new border and optionally a new caption for an open window.

PRINT FIELDS (PR F) Displays data on the screen or in a window under format control.

PRINT USING (PR U) Creates or adds a new formatted record to a file, or outputs to the screen, printer, window or other device.

PRINT (PR) Creates or adds a new unformatted record to a file, or outputs to the screen, printer, window or other device.

RANDOMIZE (RA) Resets the random number generator to a new seed (initial) value.

READ (REA) data assigns values to variables from tables created by DATA statements.

READ (REA) file inputs data from a record and assigns values to specified variables.

REM Used for remarks (an exclamation point at the beginning or end of a line serves the same purpose).

REREAD (RER) Assigns values from the last record read; must follow a successful READ or REREAD.

RESTORE (RES) data pointer moves the pointer in an internal DATA table to the first line or to the first item on the specified line.

RESTORE (RES) file pointer repositions the file pointer to the specified item, the next greatest item after the specified item, or the first item.

RETRY (RETR) Is used at the end of an error processing routine to transfer control to the statement causing the error.

RETURN (RETU) Ends a subroutine and returns control to the statement after the calling GOSUB.

REWRITE (REW) Updates an existing record.

RINPUT FIELDS (RI F) Combines PRINT FIELDS and INPUT FIELDS.

RINPUT SELECT (RI S) Sets up a menu selection screen, displays the menu items to be selected, and accepts selection input.

RINPUT (RI) Displays the value of a string variable on the bottom line of the screen or window, allows the operator to change the value, then updates the value of the string variable.

STOP (ST) Ends a program and closes all files.

TRACE (T) Displays or prints each line number as it is executed.

WHILE Is used in connection with DO or LOOP; a conditional statement causing the LOOP command to effect a loop as long as the expression is true.

WRITE (WR) Creates or adds a new record.