Chapter 4. Basic Statements; Statement Lines - IBM 5100 Basic Reference Manual

Hide thumbs Also See for 5100:
Table of Contents

Advertisement

(
(
(
Chapter 4. BASIC Statements
BASIC statements allow you to enter data and specify how that data is to be mani-
pulated and what the outcome is to be. BASIC statements are either executable or
nonexecutable. Executable statements cause a program action, such as value assign-
ment or printing. Nonexecutable statements describe information needed by the pro-
gram and the user, but cause no visible action.
Executable and nonexecutable statements can be intermixed when a BASIC program
is entered from the keyboard. The maximum number of statements permitted in a
single BASIC program is limited only by the read/write storage size of the IBM 5100
and by the statement types.
Each statement in a BASIC program must begin with a statement number. The
number determines the order of execution of the statements in the program. All
statements are executed in numeric order, regardless of the order in which they
were entered, unless the sequence of execution is altered by branches, loops, or
subroutines.
The allowable range of statement numbers for a 5100 BASIC program is from 1
through 9999. You do not have to enter preceding zeros (0020, for example) because
the 5100 maintains statement numbers as four-position integers and inserts preceding
zeros for statement numbers of less than four digits.
Statement Lines
A BASIC statement preceded by a statement number is called a statement line.
Statement lines are entered from the keyboard (one per display line) with a maxi-
mum of 64 characters. Statements cannot be split between two display lines, nor
can there be more than one statement on each display line. A typical statement
line is as shown:
10 LET A
=
2+2
statement/
B~
Number
Statement
In this chapter, all the BASIC statements are presented alphabetically in the syntax
used for BASIC commands, except the statements dealing with matrix operations.
These statements are discussed at the end of the chapter under
Matrix Operations.
67

Advertisement

Table of Contents
loading

Table of Contents