Casio Graphical Calculator Encyclopaedia

Construct: If..Then..Else..IfEnd
Type: Program flow

If <expr> Then <statements_1> [Else <statements_2>] [IfEnd]


Evaluates <expr>. If it is true (non-zero) then <statements_1> are executed, otherwise <statements_2> are executed if the Else clause is present. Control then passes to after the next IfEnd statement. If it is not present, the program ends, or returns to the program which called it.

Other information:

There may be no lines (including comments) between the If and the Then parts of this construct. A newline directly following any of the keywords in this construct apart from IfEnd will cause a syntax error. There must be a newline before Then and before Else if it is present.
See also: =>, For..To..Step..Next, While..WhileEnd, Do..LpWhile
Return to index
This page was created by Tom Lynn. Comments etc. to:
This page last updated: Friday, 30 April, 1999

Written in notepad and compiled with WTA, for clean, consistent HTML.

Validate this page with WebTechs  - Validate this page with KGV  - Best Viewed With Any Browser