While condition
   [ statements ]
   [ Break ]
   [ statements ]
End While


Runs a series of statements as long as a specified condition is TRUE.


The Break statement exits the loop in whose loop body the statement is executed.


Example:

Dim $i = 0
Dim $s = "text"

While $i <= 10
   If $s <> "" Then
      $s = $s + ","
   End If
   $s = $s + $i

   'terminate loop if the length of $s is larger than 10
   If Len($s) > 10 Then
      Break
   End If

   $i = $i + 1
End While