EasyManua.ls Logo

Sharp PC-1403 - Page 163

Sharp PC-1403
252 pages
Print Icon
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...
157
An
in
put
of
1
print
s
"
FIRST
";
2print
s
"S
EC
OND
";
3
p
r
in
ts
"
THIRD
".
A
ny
o
t
h
e
r
i
npu
t does not
produ
ce any
p
r
int.
10
INPUT
A
20 ON A GOSUB 100
,
2
00
,
300
30 END
100 PRINT
"
FIR
S
T"
110 RETURN
200 PRINT
"
SECOND
"
210
RE
T
URN
300 PRINT
"
THIRD
"
310 RETURN
Examples
*'Ml
When
th
e ON
.
..
GOSUB verb
i
s
exec
uted
,
the
e
xpre
s
s
io
n
b
et
w
een
O
N
and GOSUB
is evaluated and
reduc
ed
t
o an
i
ntege
r
.
If
t
h
e
v
a
lu
e
o
f
th
e
i
nt
e
g
er
i
s
1,
t
he
fi
rs
t
subroutine
i
n
t
he
li
s
t is e
x
e
c
u
ted as
i
n a
n
ormal
G
O
SU
B
.
If
t
he
expressio
n is
2, the
second
sub
ro
u
ti
ne
i
n the
lis
t is
exec
u
ted
,
a
n
d so
f
o
rth
.
Aft
er
the RETURN from the
subroutine
,
execu
t
i
on pro
cee
ds
w
it
h
th
e
st
ate
m
ent
wh
ich
foll
ows
th
e ON
..
.
GOSUB.
If
the
express
i
on
i
s
zero
,
nega
t
i
v
e
,
or
l
a
r
ge
r
t
h
a
n
t
h
e number of
su
brou
ti
nes provided
in the list, no
subrou
ti
ne is
exec
ut
ed and
exe
c
ution
p
roc
eed
s
w
it
h
t
h
e next line of the
program.
NOTE: Commas
canno
t
be
use
d
i
n the
e
x
p
r
e
ss
i
ons
f
o
l
l
o
wi
ng the GOSUB. The
COMPUTER cannot d
i
sti
n
g
uis
h b
et
w
ee
n
c
omm
as in
e
x
pressions and com-
mas between e
x
p
re
ss
io
n
s.
The ON
...
GOSUB
ve
r
b
i
s
u
s
ed to e
x
e
cu
te o
n
e
o
f a
se
t
of
s
ubrou
ti
ne
s
de
p
end
i
ng on
the
v
a
l
ue
o
f a
co
nt
rol
ex
p
r
e
ss
i
on
.
Abb
r
ev
i
ation
s
:
O
. ;
G
OS.
,
GO
S
U
.
See
a
l
so
:
GO
S
UB
,
GO
TO
,
O
N
. . .
GOT
O
1
ON
ex
pre
ss
i
on GOSUB
express
io
n
li
s
t
Where
:
ex
p
re
ssion
li
s
t
i
s
:
exp
r
ess
i
o
n
o
r
:
e
xp
r
es
s
i
o
n
,
e
x
p
r
ess
i
o
n
~is
t
Verbs
ON
...
GOSUB

Related product manuals