D Documentation  
While statement
while ( /* boolean expression */ )
  statement;

or:

while ( /* boolean expression */ )
{
  statement1;
  statement2;
  // ...
}


Executes the statement as long as the boolean expression is true. If the expression is false from the beginning, it will not execute any statements. If you want the loop to execute your statements at least once, use the Do-While Statement.

Example:
int i = 0;
while (i < 4)
{
  writefln("i = %d", i);
  i++;
}

Output:
i = 0
i = 1
i = 2
i = 3


Created using PHP docwiki written by Markus Dangl. Best viewed with Mozilla Firefox.