Download Print this page

Goldstar FC-200 Operating Instructions Manual page 53

Family computer

Advertisement

4. CONDITIONAL
(IF—THEN,
the fore
By
unconditionally to a
__
those statements.
the system always branches
But
statements;
ing
IF—THEN
1)
IF Y=0 OR M=0 OR D=0
conditional
the
If
ample,
the
result of
If
and
D
executable statement.
next
IF—GOTO
2)
X>0
IF
Lid
Conditional
the
If
the
ple),
the
If
execution continues
this
In
number)
(line
IF—THEN—ELSE
3)
4
X>0
IF
Conditional
expression
the
result of
If
if
but
it
JUMP
(IF—THEN)
IF—GOTO,
I—THEN—
GOSUB
going
GOTO,
specified
IF—THEN,
expression
the
result
conditional
of
values
the
of Y,M,D
the
conditional
#0),
the
"THEN"
|
case
of
conditional JUMP)
(In
GOTO 120 (or
Jump command
the
result of
conditional
system branches
the
result
of
expression
with the next
THEN (line
case,
number)
statement and
Sa]
THEN
PRINT
of
the
conditional expression
not true,
is
ELSE
ON—GOTO
ELSE,
statements, the system
line
when the
conditionally to a
IF—GOTO,
IF—THEN—ELSE,
THEN
PRINT
Execution
being
expression
is
are
the
THEN
0),
not
expression
is
clause
is
ignored
IF>0
is
expression
120
and then
to
line
is
not true,
GOTO
executable statement.
statement can be used
lead to the
same program execution.
GOTO 120
:
execution
case
in
being true
is
true,
clause
executed.
is
asie==
statement)
fails
never
program execution comes
specified
line by
etc.
"
#iGOTO
after expressions
recognized
true
case
the
of
(in
clause
executed.
is
Y#
true
case
of
(in
and the system continues
THEN 120 will
La)
command
Jump
true
the
=O
above exam-
in
(X
line
executed.
is
the
clause
is
ignored
in
place
PRINT
ELSE
ABS(X)
Execution
case
In
not being true
is
THEN clause
branch
to
to
the
follow-
above
ex-
Y#0,
0,
the
be
O.K.)
and
the
of
GOTO
of
executed,

Advertisement

loading