Download Print this page

Goldstar FC-200 Operating Instructions Manual page 52

Family computer

Advertisement

4
&
GOTO
1)
It
quence
GOSUB
2)
In
statement
The
is
that
branch back
But
the
To
ROUTINE"'.
Routine
Main
Routine
Sub
statement
the system branch
let
will
to
specified
a
statement
case
the
some
of
of
make
will
parts called
by GOSUB
the
[RETURN]
statement
the subroutine
the parts
of
statement
to the
it
recommended
is
(what we
program
from the
distinguish
18
INPUT! THISYEAR";y
zo
INFUT"
THISMONTH
38
IMNFUT" THISDAY
140
GOSUB
5%
H=A
60
INFUT"
BIRTH YEAR
78
INPUT"
BIRTHMONTH ";5M
—_
30
INPUT"
BIRTHDAY
30
140
GOSUE
168
H=A-N
116
FRIHT'
FROM YOUR BIRTH DAY TO TODAY
126
FRINT H5"
+
138
END
IF
140
V=G
OR
'iB0TO0 10
IF
150
M>Z
THEN
M=M+13:iV=V-1
1680
178
HTC365,254Y)+INT(30,64M)+D4—
188
Y=@:M=0:D=9:RETURH
unconditionally out of
number.
line
executed repeatedly, the use
program
being
program shorter.
the
statement
are
last
line of
the
in
terminated and
is
following
4
4
the subroutine
that
call-MAIN ROUTINE)
subroutine, the program
4
&
";M
"ip
4
";Y
———
«INPUT
"sp
———————
bi
DAYS
M=B
OR
D=8 THEN
M=M+1:60T0 178
«
—50-—
the
normal
called
'"SUBROUTINE".
the subroutine and
cause
the
recent
GOSUB
most
be readily
distinguishable
is
INPUT THIS YEAR
INPUT
INPUT THIS DAY
SUBROUTINE
INPUT BIRTH YEAR
IMPUT BIRTH MONTH
SUBROUTINE
*
__5inPuT
"
PRINT
process
NPUTING
JUDGE OF
YEARS
CALCULATION OF
DAYS
program se-
this
of
There
means
it
the program
to
statement.
from
called
"MAIN
THIS
MONTH
THIS DAY
OF
INTEGER
LEAP

Advertisement

loading