EasyManua.ls Logo

Atari 800

Atari 800
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...
70
User's
Handbook to the Atari 400/800 Computers
Note
in
line
910
that
a
GOTO
statement
is
not
used
to
precede
the
line
number
being
branched
to
.
When
a
line
number
is
indicated
following
a THEN
or
ELSE
statement,
the
computer
does
not
require
the
presence
of
GOTO,
which
is
assumed.
ON,
COlO
Statement
The
ON,
GOTO
statement
is
a
combination
of
a
conditional
statement and a
branching
statement. The use
of
the
ON,
GOTO
statement
is
illustrated
in
the
following
program.
100 INPUT A
200
ON
A
GOTO
250,260
210
GOTO
999
250
PRINT A:
GOTO
100
260
PRINT A 1\
2:GOTO
100
999
END
If
the
variable
or
expression
following
ON
evaluates
to
1,
program
control
branches
to
the first
line
number
specified after
GOTO
;
if
2,
to
the
second;
if
3,
to
the
third,
etc.
If
the
variable
or
expression evaluates to a
number
greater
than
the
number
of
line
numbers
following
GOTO,
program
control
will
branch
to
the
statement
immediately
following
the
ON,
GOTO
statement. This
is
also the
case
if
the
variable
or
expression
following
ON
evaluates
to
zero.
Subroutines & COSUB Statements
Many
times you
will
find
that the same set
of
program
instructions
are used
more
than
once
in a
program
.
Re-entering
these
instructions
throughout
the
program
can be very
time
consuming.
By
using subroutines, these
additional
entries
will
be
unnecessary.
A
subroutine
can be
defined
as
a
program
which
appears
within
another
larger
program.
The
subroutine
may be executed
as
many times
as
desired.

Other manuals for Atari 800

Related product manuals