137
Programming
Chapter 8
If~Then~Else
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).
Syntax:
Parameters:
condition, numeric expression
Description:
1. The Then-statement is executed when the If-conditions is true (non-zero).
2. The Else-statement is executed when the If-conditions is false (zero).
Example:
If A = 0
_
Then ”TRUE”
_
Else ”FALSE”
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:
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).
Example:
?
"
A
_
If A = 0
_
Then ”TRUE”
_
Else ”FALSE”
_
IfEnd
_
”END”
If
<condition>
_
:
^
Then <statement>
_
:
^
<statement>
numeric expression
_
:
^
Else <statement>
_
:
^
<statement>
If
<condition>
_
:
^
Then <statement>
_
:
^
<statement>
numeric expression
_
:
^
Else <statement>
_
:
^
<statement>
_
:
^
IfEnd
Summary of Contents for fx-7400G
Page 46: ...Differential Calculations Chapter 3 ...
Page 164: ...161 1 2 3 4 5 Program for Circle and Tangents No 4 Step Key Operation Display ...
Page 165: ...162 Program for Circle and Tangents No 4 Step Key Operation Display 6 7 8 9 10 ...
Page 166: ...163 11 12 13 14 15 Program for Circle and Tangents No 4 Step Key Operation Display ...
Page 167: ...164 16 17 18 Program for Circle and Tangents No 4 Step Key Operation Display ...
Page 170: ...167 1 2 3 4 5 Program for Rotating a Figure No 5 Step Key Operation Display ...