Jump Commands (Jump); Dsz (Count Jump); Goto~Lbl - Casio FX-CG20 AU User Manual

Hide thumbs Also See for FX-CG20 AU:
Table of Contents

Advertisement

Stop
Function: This command terminates execution of a program.
Syntax: Stop
Description:
• This command terminates program execution.
• Execution of this command inside of a loop terminates program execution without an error
being generated.
k Jump Commands (JUMP)

Dsz (Count Jump)

Function: This command is a count jump that decrements the value of a control variable by 1,
and then jumps if the current value of the variable is zero.
Syntax:
Dsz <variable name> : <statement>
Parameters: variable name: A to Z,
[Example] Dsz B : Decrements the value assigned to variable B by 1.
Description: This command decrements the value of a control variable by 1, and then tests
(checks) it. If the current value is non-zero, execution continues with the next statement.
If the current value is zero, execution jumps to the statement following the multi-statement
command (:), output command ( ^), or carriage return ( _).

Goto~Lbl

Function: This command performs an unconditional jump to a specified location.
Syntax: Goto <label name> ~ Lbl <label name>
Parameters: label name: value (0 to 9), variable (A to Z,
Description:
• This command consists of two parts: Goto
n
and Lbl
(where
execution to jump to the Lbl-statement whose
Goto-statement.
• This command can be used to loop back to the beginning of a program or to jump to any
location within the program.
• This command can be used in combination with conditional jumps and count jumps.
• If there is no Lbl-statement whose value matches that specified by the Goto-statement, an
error occurs.
Variable Value ≠ 0
Variable Value = 0
, θ
r
n
is the parameter referenced by Goto
_
:
<statement>
^
, θ )
r
n
n
(where
is a parameter as described above)
n
). This command causes program
n
parameter matches that specified by the
8-17

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx-cg10

Table of Contents