Chapter
4/
BASIC
Concepts
This chapter explains how
to
use the full power of BASIC for
TRSDOS Version
6.
This information can help programmers build
powerful
and
efficient programs.
If
you are still something of a novice,
you might want
to
skip this chapter for now, keeping
in
mind that the
information is here when
you
need
it.
The chapter is divided into four sections:
A.
Overview
- Elements of a Program. This section
defines many of the terms
we
will
be
using
in
the chapter.
B.
How BASIC
Handles
Data. Here we discuss how BASIC
classifies
and
stores data. This shows you how to get BASIC to store
your data
in
its most efficient format.
C. How BASIC
Manipulates
Data. This gives you an
overview of
all
the different operators and functions you can use to
manipulate and test your data.
D. How to Construct
an
Expression. This topic can help
you
in
constructing powerful statements instead of using many short
ones.
A-
Overview:
Elements
of a Program
This overview defines the elements of a program.
A program
is
made
up
of "statements"; statements may have several
"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
0
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 type a maximum of 249 characters per line. BASIC
reserves the remaining six characters for the line number and for the
space following the line number.
Here is a sample program:
2-25