While

From Compost Wiki
Revision as of 17:10, 17 November 2015 by Jeffm (talk | contribs) (moved WHILE to While: All Capps doesn't work for keyword find in compost)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WHILE

Starts a prog defined loop that will run until the specified boolean argument list returns false. The loop will run to the corresponding END statement in a similar manner to IF but will execute multiple times until the test is false.

For example:

WHILE LTEqual? GetVar#('counter') Parts#
{Do stuff}
IncVar('counter')
END

You may exit a WHILE loop early with the BREAK statement.