EasyManua.ls Logo

Atari XL

Atari XL
262 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...
Programming
23
COST
begins
with
COS.
(See
Appendix
1 for a full
list
of
all
the
BASIC
reserved
words.)
TYPES
OF VARIABLE
There
are
two
different
types
of
variable,
one
represents
numbers,
the
other
represents
words.
The
type
which
represents
numbers
is
called
the
numeric
variable;
the
type
representing
words
is
the
string
variable,
so
called
because
it
contains
a
sequence
or
(string'
of
characters.
The
variables
in
the
rectangle
program
were
all
numerical
variables.
Numeric
Variables
These
are
used
to
represent
numbers
and
can
have
any
value,
whole
numbers
or
fractions.
Real
variables
should
be
used
in
all
arithmetical
programs.
Real
variables
can
have
any
value,
for
example:
REAL
=
3.72
SIZE
=
87.3
*
2.5
String
Variables
A
string
variable
is
used
to
store
words,
letters
or
numbers.
The
variable
name
for a
string
variable
must
be
followed by a
dollar
sign
($)
to
distinguish
it
from
the
a
numeric
variable.
Examples
are:
NAME$
= "WINSTON CHURCHILL"
STRING$
= "ABCDEFG"
Note
that
the
letters
defining
the
variable
contents
are
enclosed
by
quotation
marks.
A
string
variable
can
hold
almost
any
number
of
characters,
limited
only
by
the
amount
of
memory

Related product manuals