Casio Graphical Calculator Encyclopaedia

Construct: While..WhileEnd
Type: Looping construct

While <expr> <statements> WhileEnd


Evaluates <expr>. If it is true (non-zero), the <statements> are executed. If not, control passes to the statement following the WhileEnd. This process is repeated until <expr> is evaluated as false. If <expr> is originally false (zero) the program control skips to after the WhileEnd immediately and the <statements> are not executed at all.

Other information:

This construct has a bug which sends your calc into an infinite loop which even overrides the [AC] button. Warning - if you try this out you will need to press the reset button on the back of your calc. It shouldn't cause any permanent damage, but of course, if it does, it's your fault, not mine.

  Lbl 0
    While 0
  Goto 0
See the Break token for an explanation of this bug.
Thanks to Ing-Kye Sim for pointing out this more concise form to me.
See also: Do..LpWhile, For..Next, Break, Goto
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