Casio ClassPad 300 Uživatelský manuál Strana 547

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 670
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 546
20021201
Syntax 4: If
<expression>
Then
[<statement>] …
ElseIf
<expression>
Then
[<statement>] …
Else
[<statement>] …
IfEnd
Function 4
If the expression is true, the statement in the If Then block is executed. After that,
execution advances to the next statement after IfEnd.
If the If command expression is false, the ElseIf command expression is tested. If it is true,
the statement in the ElseIf Then block is executed. After that, execution advances to the
next statement after IfEnd. If it is false, the Else block statement is executed. After that,
execution advances to the next statement after IfEnd.
Description
•With all four of the syntaxes described above, you can use a multi-statement command (:)
in place of the carriage return to separate Then block statements.
•The If~IfEnd command can be nested.
Example: Input a
Input b
If a < 0
Then
0 S a
If b < 0
Then
0 S b
IfEnd
IfEnd
•The If~IfEnd loop can be exited using the Break command or Return command.
It is always a bad idea to use the Goto command to exit an If~IfEnd loop. Not only is it
poor programming, it can cause problems due to improper termination of internal
processes used by If.
12-6-12
Program Command Reference
}
If Then <block>
}
ElseIf Then <block>
}
Else <block>
Zobrazit stránku 546
1 2 ... 542 543 544 545 546 547 548 549 550 551 552 ... 669 670

Komentáře k této Příručce

Žádné komentáře