TRS-SO
MODEL III
Overview
--
Elements
of
a
Program
This overview defines the elements
of
a program:
The
programitself, which consists
of
.
Statements, whichmay consist
of
.
Expressions
We
will referto these terms during the rest
of
this chapter.
Program
A program is made up
of
one
or
more numbered lines. Each line contains one
or
more BASIC statements. BASIC allows line numbers from 0 to 65529 inclusive. You
may include up to 255* characters perline, including the line number. You may
also have two
or
more statements to a line, separated by colons.
*Youcan only type in 240 characters for new lines; using the Edit Mode, you can
addthe extra
15
characters.
Here is a sampleprogram:
Line
BASIC Colon between
~
BASIC
statement
n~mb~~statements
~
_
100 CLS: PRINT "NORMAL
MODE
...
"
1)0 PRINT "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
120
FOR
1=
1
TO
1000: NEXT I
130
CLS:
PRINT CHR$(23); "DOUBLE-SIZE
MODE
...
"
140 PRINT "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
150
END
When BASIC executes a program, it handles the statementsone at a time, starting at
the first and proceeding to the last. Some statements, suchas
GOTO, ON
...
GOTO,
GOSUB,
change this sequence.
1/2