Casio fx-9860G User Guide - Page 220
Program Commands COM, If~Then~Else~IfEnd, Function, Syntax, Parameters, Description, For~To~Step~Next
UPC - 079767177928
View all Casio fx-9860G manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 220 highlights
I Program Commands (COM) 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 numeric expression _ : Then ^ _ : ^ _ _ _ : Else : : IfEnd ^ ^ ^ Parameters: condition, numeric expression Description: (1) If ~ Then ~ IfEnd • When the condition is true, execution proceeds with the Then-statement and then continues with the statement following IfEnd. • When the condition is false, execution jumps to the statement following IfEnd. (2) If ~ Then ~ Else ~ IfEnd • When the condition is true, execution proceeds with the Then-statement and then jumps to the statement following IfEnd. • When the condition is false, execution jumps to the Else-statement and then continues with the statement following IfEnd. For~To~(Step~)Next Function: This command repeats everything between the For-statement and the Nextstatement. The starting value is assigned to the control variable with the first execution, and the value of the control variable is changed according to the step value with each execution. Execution continues until the value of the control variable exceeds the ending value. Syntax: For m To Step Parameters: _ : Next ^ • control variable name: A to Z • starting value: value or expression that produces a value (i.e. sin x, A, etc.) • ending value: value or expression that produces a value (i.e. sin x, A, etc.) • step value: numeric value (default: 1) Description: • The default step value is 1. • Making the starting value less than the ending value and specifying a positive step value causes the control variable to be incremented with each execution. Making the starting value greater than the ending value and specifying a negative step value causes the control variable to be decremented with each execution. 8-9