EasyManua.ls Logo

Sharp PC-1403 - Page 150

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...
1
44
W
hen
th
i
s
p
r
og
ra
m
i
s
run it
p
r
in
ts
th
e
wor
d
'
HELLO
'
o
ne
t
i
me
.
10
GO
SUB 100
2
0
END
100 PRINT
"
HELLO
"
110
R
~
TURN
•¥f!,,1.u4
The group
of
st
a
t
eme
nt
s
i
s
i
n
c
l
u
d
ed
in
t
h
e
p
rog
r
a
m
a
t
s
ome
l
oc
at
i
o
n
w
he
re
the
y
a
r
e
not
reached
in
t
he
n
orm
a
l
s
eq
u
en
ce of exec
ut
ion
.
A
freque
nt
l
oca
ti
on
i
s
after
t
he END
statement
w
hic
h
m
arks
th
e end
o
f the
m
a
i
n
prog
r
am
.
At
t
hose
l
oc
ation
s
i
n
the main
body of the
program-whe
r
e
subro
utin
e
s
a
r
e
t
o be
exec
u
ted
-incl
ude
a GOSUB state-
ment with an
exp
r
ess
ion
whi
ch
i
n
di
c
a
t
e
s
th
e
s
t
art
i
ng
line
numb
e
r
o
f the subroutine.
The last line of the
sub
ro
ut
i
ne
m
u
s
t
b
e a
RETURN
.
W
hen
GO
S
UB
i
s
executed, the
COMPUTER
tra
n
s
f
ers
con
t
ro
l
t
o the
i
nd
i
c
at
e
d
li
ne
nu
mber and processes the state-
ments until a RETURN
i
s
r
eache
d
.
C
on
t
rol
i
s
th
e
n
t
rans
fe
rred back to the statement
following the GOSUB.
A
subroutine may
i
n
cl
ud
e a
GOSU
B
.
Sub
rou
t
i
n
e
s may
be
"
n
es
ted
"
i
n
this
fa
s
hi
o
n
up
to
10
levels
d
ee
p
.
The
e
xpre
ss
i
on
i
n a
G
OS
UB statem
e
nt
m
ay
n
o
t
in
cl
ude a
c
omm
a,
e
.g
.,
'A
(
1,
2)'
c
anno
t be
used
.
S
inc
e the
r
e
i
s
a
n
O
N
.
.
.
GO
SUB
s
t
ru
cture
t
or
c
ho
os
in
g
diff
e
rent
subrout
i
n
es
a
t given
l
o
c
ati
o
ns
i
n
th
e
pro
g
ra
m,
th
e ex
pr
e
s
sio
n u
s
u
a
ll
y
c
onsis
t
s
o
f
ju
s
t
th
e
de
si
r
ed
l
in
e
nu
mb
e
r
.
Whe
n
a
nu
m
e
ric
e
x
pre
ss
i
on
i
s
u
s
ed
,
it
mu
s
t
e
v
a
l
uat
e to a
valid
l
i
ne
nu
m
ber
,
i.
e
. ,
1
to
652
79
,
or
a
n
ERR
O
R
4
w
i
ll
occ
ur
.
••MW
Wh
e
n
y
ou
w
i
s
h
to
e
xecut
e the
s
ame
g
ro
u
p
o
f
statem
ents
s
eve
ra
l
times
i
n
the
co
ur
se of
a
pro
gra
m
o
r
u
se a
p
r
ev
i
o
usly
w
r
i
tt
en set
o
f
sta
t
e
m
en
ts in
s
e
ve
r
a
l
·
pro
g
r
ams
,
it is
con
v
enien
t
t
o
u
s
e the
B
AS
I
C capab
i
lit
y
f
o
r
s
ub
ro
utin
es
u
s
ing
t
he GOSUB and
R
E
TURN
v
er
bs
.
Th
e GOSUB
v
erb is
u
sed
t
o
exec
ut
e a
B
AS
I
C s
u
broutin
e
.
1
GOSUB
e
xp
res
sio
n
Abbrevia
ti
on
s: GO
S
.,
GOS
U.
See
a
lso:
GOTO
,
O
N
..
G
O
S
U
B
,
ON
..
.
G
OT
O
,
RETURN
Verbs
GOSUB

Related product manuals