A unconditional jump command g, E-66 – Casio fx-50F PLUS User Manual
Page 67

E-66
→ (Variable Assignment)
Syntax
{expression ; ?}
→ {variable}
Function
Assigns the value obtained by the element on the left to the variable on the
right.
Example A+5
→ A
: (Separator Code)
Syntax
{statement} : {statement} : ... : {statement}
Function
Separates statements. Does not stop program execution.
Example ?
→ A : A
2
: Ans
2
^ (Output Command)
Syntax {statement}
^ {statement}
Function
Pauses program execution and displays the result of the current execution.
The
Q symbol is turned on while program execution is paused by this
command.
Example ?
→ A : A
2
^ Ans
2
A Unconditional Jump Command g
Goto ~ Lbl
Syntax Goto
n
: .... : Lbl
n
or Lbl
n
: .... : Goto
n
(
n
= integer from 0 to 9)
Function
Execution of Goto
n
jumps to corresponding Lbl
n
.
Example ?
→ A : Lbl 1 : ? → B : A × B ÷ 2 ^ Goto 1
Important!
A Syntax ERROR occurs if there is no corresponding Lbl
n
in the same program where
Goto
n
is located.
A Conditional Jump Commands and Conditional Expressions
g
S
Syntax
1 {expression} {relational operator} {expression}
S {statement1} :
{statement2} : ....
2 {expression}
S {statement1} : {statement2} : ....
Function
Conditional branching command used in combination with relational
operators (=,
≠, >, >, <, <).
Syntax 1: {statement1} is executed if the condition to the left of the
S
command is true, and then {statement2} and everything after it is executed
in sequence. {statement1} is skipped if the condition to the left of the
S
command is false, and then {statement2} and everything after it is executed.
Syntax 2: A non-zero evaluation result of the condition to the left of the
S
command is interpreted as “true”, so {statement1} is executed, followed by
{statement2} and everything after it in succession. A zero evaluation result
of the condition to the left of the
S command is interpreted as “false”, so
{statement1} is skipped, and {statement2} and everything after it is executed.