FANDOM


(84) :While condition:commands:End
(89) :While condition:commands:EndWhile

The While command performs a group of commands while the condition is true.

The condition is tested when While is Encountered.

If the condition is true, the program executes a group of commands, else the program skips to the line after End.

The while loop is returned to the beginning by End.

While can be nested.

Location Edit

  • Prgm
  • CTL
  • 5:While

Example Edit

:ClrHome
:While X5
:Input "NUMBER? ",X
:Disp "NOT 5"
:End
:Disp "IT'S 5"

This program asks the user to input the number. Every time that the number is not 5, the program will display "NOT 5" and ask the user for another number. Once the number is 5, the program will display "IT'S 5".

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.