Casio fx-50F User Manual page 68

Casio calculator user's guide fx-50f
Hide thumbs Also See for fx-50F:
Table of Contents

Advertisement

Lbl 1 : ? → A : A > 0
Example
=, ≠, >, > , <, < (Relational Operators)
Syntax
{expression} {relational operator} {expression}
Function
These commands evaluate the expressions on either side, and return a value
of true (1) or false (0). These commands are used in combination with the
branching command
If statements and While statements.
Example
See the entries for
(page 68).
Note
These commands evaluate the expressions on either side, and return 1 if true and 0 if false,
and store the result in Ans.
A Control Structure Commands/If Statement
The If statement is used to control program execution branching according to whether the
expression following If (which is the branching condition) is true or false.
If Statement Precautions
• An If must always be accompanied by a Then. Using an If without a corresponding Then
will result in a Syntax ERROR.
• An expression, Goto command, or Break command can be used for the {expression*}
following Then and Else.
If~Then (~Else) ~IfEnd
Syntax
If {conditional expression} : Then {expression*} : Else {expression*} : IfEnd :
{statement} : ...
Function
• The statements following Then are executed up to Else, and then the
statements following IfEnd are executed when the conditional statement
following If is true. The statements following Else and then the statements
following IfEnd are executed when the conditional statement following If is
false.
• Else {expression} may be omitted.
• Always include the IfEnd:{statement}. Omitting it will not cause an error,
but certain program contents can cause unexpected execution results by
everything after the If statement.
? → A : If A < 10 : Then 10A
Example 1
? → A : If A > 0 : Then A × 10 → A : IfEnd : Ans×1.05
Example 2
A Control Structure Commands/For Statement
The For statement repeats execution of the statements between For and Next as long as
the value assigned to the control variable is within the specifi ed range.
For Statement Precautions
A For statement must always be accompanied by a Next statement. Using a For without a
corresponding Next will result in a Syntax ERROR.
' (A)
Goto 1
, and when structuring the {conditional expression} of
(page 66), If statement (page 67), and While statement
Else 9A
E-67
IfEnd : Ans×1.05

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx-50f plus

Table of Contents