EasyManua.ls Logo

Atari 400

Atari 400
326 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...
Introduction
to
Atari BASIC
47
BASIC Variables
So
far, we have
only
discussed data
constants.
A constant can
be
defined
as
a fixed val ue. The
following
are examples
of
string and
numeric
constants.
"Jack
Novet"
"375"
27.59
o
100000
A name can be used
to
express data
as
well
as
a constant.
Variables are used
to
express data
as
a name.
A variable can be
defined
as
a
quantity
that can assume
anyone
of
a
group
of
values. Variables are represented
by
variable
names. These consist
of
a
letter
followed
optionally
by
additional
letters and/
or
numbers. The value assumed
by
a variable
is
subject
to
change,
depending
upon
the
program
statement
being
executed
. For
example
, in the
following,
100
LET
A =
5.0
200
LET
B =
7.0
300
LET
A = A + B
the variable A
is
initially
assigned a value
of
5.0and B
is
assigned a
value
of
7.0. In
line
300
, the variable A
is
assigned a
new
value
equal
to
the
sum
of
variables A and B,
which
is
12.0. The
previous
value
of
A
is
erased.
Note
the
use
of
the LETsta
tement
in
the
preceding
example
. The
LET
statement
is
used
to
assign a value
to
a variable.
Whenever
a
LET
statement
is
used in a
program,
the value
of
the variable
on
the left side
of
the
equation
is
to
be
replaced
with
the
value
appearing
on
the right.
The reserved
word
,
LET
need
not
actually
be
included
in a
LET
statement. Both
of
the
following
statements have
the
same

Other manuals for Atari 400

Related product manuals