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...
22
The
Atari
XL
Handbook
I
HEIGHT
AREA
=
WIDTH
X HEIGHT
1
..
WIDTH
names
instead
of
numbers
we
can
write
a
program
to
work
out
the
area
of
any
rectangle:
10
WIDTH
= 8
20 HEIGHT
=
12
30
AREA
=
WIDTH
* HEIGHT
40 PRINT "AREA
=
";
AREA
This
program,
when
RUN,
will
print
the
area
of
a
rectangle
12
inches
by 8
inches.
By
changing
the
numbers
in
lines
10
and
20 we
can
obtain
the
area
of
a
rectangle
of
any
size.
VARIABLE
NAMES
A
variable
name
can
have
as
many
as
114
characters.
All
variable
names
must
begin
wi
th
a
letter,
but
the
other
characters
may
be
numbers,
for
example
Al,
EGG7, LAST1.
There
must
not
be
any
spaces
in
a
variable
name
as
this
will
confuse
the
computer.
NOTE
You
cannot
use
as
a
variable
name
any
of
the
BASIC
command
words,
or
any
name
which
begins
wi
th
the
letters
of
a
BASIC
command
word.
If
you
do,
the
Atari
will
complain
of
errors
as
soon
as
you
type
the
line.
For
example,
the
name
LENGTH
begins
with
LEN,
and

Related product manuals