MSL does not have WHILE loops. Nor does it have FOR or IF-THEN constructs. As you mentioned, it does have FOREACH and IF-THEN-ELSE though.
MSL is not a regular procedural language such as C(++), FORTRAN, Pascal, VB, Java, ... in the sense that we are not dealing with [u]statements[/u] that are executed one after the other. Instead, we have [u]equations[/u] that are automatically sorted. Consequences of this are that we always need a left-hand-side as well as a right-hand-side for any equation at any time (which is why the ELSE part in IF-THEN-ELSE constructs is indispensable) and that FOREACH constructs lead to an expansion (unrolling) of the equation set. WHILE and plain FOR (non-expanded) are therefore not possible.