WHILE

From TVPaintWiki
Revision as of 14:05, 22 December 2009 by KenC (Talk | contribs) (Created page with '{{LangRefCatCrumbs}} WHILE(condition) (instructions) END Executes a series of instructions while the specified condition is true. Unlike the DO...UNTIL instruction, …')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

<<<George<<<George Language Reference

  WHILE(condition)
     (instructions)
  END

Executes a series of instructions while the specified condition is true. Unlike the DO...UNTIL instruction, the instructions will never be executed if the condition is false. The test on the condition is carried out before the instructions contained in the loop are executed for the first time.

Example :

// To count up to 10
a = 0
WHILE (a < 10)
	a = a + 1
	PRINT a
END