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...
28 The A
tar;
XL
Handbook
The
variables
must
have
commas
separating
them
in
the
INPUT
command.
If
you
press
RETURN
before
entering
all
the
items
the
XL will
print
another
question
mark
and
wai
t for
the
remaining
items.
When
you
type
in
the
information
you
must
use
a
comma
to
separate
numeric
entries,
or
press
RETURN
to
mark
the
end
of
each
string
entry
(a
comma
would
be
counted
as
part
of
the
string).
If
you
enter
too
many
items
the
surplus
ones
will
be
ignored.
Let's
use
what
we
know
about
variables
and
INPUT
to
improve
the
area
program.
Clear
the
computer's
memory
by
typing
NEW
(RETURN),
and
then
type
in
this
program.
10
REM
IMPROVED
AREA
PROGRAM
20
PRINT
" " "
30
PRINT
"ENTER
WIDTH" ;
40 INPUT
WIDTH
50
PRINT
"ENTER
HEIGHT";
60
INPUT HEIGHT
70
AREA
=
WIDTH
*
HEIGHT
80
PRINT:
PRINT
"AREA
=
" .
AREA
,
This
program
will
read
the
two
numbers
you
type
in
for
width
and
height
and
print
the
area
of
the
rectangle.
Using
INPUT
has
made
the
program
much
more
flexible: we
don't
have
to
alter
the
program
to
use
different
numbers.
REMARKS
Line
10
of
the
last
program
is
a
remark
or
comment
statement.
These
are
used
to
hold
comments,
notes
and
titles
to
make
the
purpose
of a
program
and
the
way
in
which
it
works
clear
to someone
reading
the
listing.
Remarks
are
identified
by
the
word
REM
before
the
remark
and
have
no effect
when
the
program
is
RUN.

Related product manuals