EasyManua.ls Logo

Radio Shack TRS-80 Model III - Page 106

Radio Shack TRS-80 Model III
274 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
;
I
TRS-80
MODEL
Overview
Elements
of
a
Program
This
overview defines the elements
of a program:
The
program itself, which
consists of . .
.
Statements, which
may consist of
. . .
Expressions
We will refer
to
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 to
65529 inclusive.
You
may include
up
to
255*
characters
per line, including the line number.
You may
also have
two or more
statements
to a
line,
separated
by colons.
*You can only type in
240 characters
for new lines; using the
Edit Mode,
you can
add the
extra 15 characters.
Here is a sample program:
Line BASIC
Colon
between
^
BASIC
statement
number
/statement^--
statements
100 CLS:^PRINT
"NORMAL
MODE..."
110 PRINT
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
120
FOR
l
=
1 T0
1000: NEXT
I
130 CLS: PRINT
CHR$(23);
"DOUBLE-SIZE
MODE..."
140
PRINT
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
150
END
When
BASIC
executes a
program, it handles
the statements
one at a time,
starting at
the
first and proceeding
to the last. Some
statements, such
as GOTO,
ON . . . GOTO,
GOSUB, change this
sequence.
96

Other manuals for Radio Shack TRS-80 Model III

Related product manuals