This project is read-only.

While loop

The while loop allows executing a statement or a block of code several times, as long as the condition evaluates to a logical true value. It's specified with the while keyword:

var a = 5
while a >= 0 do
  println a
  a -= 1
print "blast off!" 

While loop can be controlled with loop control statements.

Last edited Mar 17, 2011 at 10:42 AM by impworks, version 2


No comments yet.