Casio CFX-9970G Programming Manual page 25

21. programming
Hide thumbs Also See for CFX-9970G:
Table of Contents

Advertisement

If~Then~Else~IfEnd
Function: The Then-statement is executed only when the If-condition is true
(non-zero). The Else-statement is executed when the If-condition is false (0). The
IfEnd-statement is always executed following either the Then-statement or
Else-statement.
Syntax:
If
<condition>
numeric expression
_
:
Else <statement>
^
Parameters: condition, numeric expression
Description:
This command is almost identical to If~Then~Else. The only difference is that the
IfEnd-statement is always executed, regardless of whether the If-condition is true
(non-zero) or false (0).
A _
Example: ?
If A = 0 _
Then "TRUE"_
Else "FALSE"_
IfEnd_
"END"
For~To~Next
Function: This command repeats everything between the For-statement and the
Next-statement. The starting value is assigned to the control variable with the first
execution, and the value of the control variable is incremented by one with each
execution. Execution continues until the value of the control variable exceeds the
ending value.
Syntax:
For <starting value>
_
<statement>
:
^
Command Reference
_
:
Then <statement>
^
_
:
I<statement>
^
<control variable name> To <ending value>
Next
21- 11
_
<statement>
:
^
_
:
IfEnd
^
_
:
^
389

Advertisement

Table of Contents
loading

Table of Contents