Sharp PC-1403 Operation Manual page 151

Hide thumbs Also See for PC-1403:
Table of Contents

Advertisement

145
This
program prints
'YES'
if a 'Y' is
entered
and
prints 'NO'
if anything else
is entered.
10
INPUT
A$.
20 IF
A$="Y"
THEN GOTO
50
30 PRINT
"NO"
40
GOTO
60
50 PRINT
"YES"
60
END
Examples
The expression
in
a GOTO
statement may not
include
a
comma, e.g., 'A(1,2)'
cannot be
used. Since there is an ON
...
GOTO
structure
for
choosing
different
destinations
at given
locations in the
program,
the
expression
usually
consists of just
the desired line
number, i.e.,
1
to
65279,
or
an ERROR
4
will occur.
Well designed programs
usually flow
simply
from
beginning
to
end, except for
subroutines executed during
the program. Therefore,
the
principal
use
of
the GOTO
verb is as a part of an IF.
. .THEN statement.
1
1
#1
The GOTO
verb 1ransfers control from one location
in
a
BASIC
program to
another
location. Unlike the GOSUB
verb,
GOTO
does
not "remember" the
location from
which
the transfer occurred.
1411;.t-t1M
The
GOTO verb is
used
to
transfer
control
1o a specified line number.
1
GOTO
expression
Abbreviations: G.,
GO.,
GOT.
See
also: GOSUB, ON
... GOSUB,
ON
...
GOTO
Verbs
GOTO

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents