Just some additional info -

The While/Loop command pair is similar to the Do/Until command pair - both perform a set of instructions until a test evaluates to true. While/Loop is fairly common, compared to Do/Until, so I'm mentioning it because there is a significant difference between the two that could affect your decision to use one or the other.

A While loop will be executed ZERO or more times, because the test is evaluated BEFORE the loop commands are executed.

The commands in a Do/Until loop will always be executed at least once, because the test is evaluated at the END of the loop.

If you want to run all of the commands at least once, you need to use Do/Until, otherwise While/Loop will usually fit the bill.

In Mart's example, the loop control variable is statically defined, so he knows the loop will be executed at least once. If the value of "$a" were set via external means, you might not know what it contained - what if it were the result of a calculation and was set to 21?

The point is - there are two types of loops to be aware of, and each has their own advantages. You need to choose the loop control based on your needs. Here's an alternative example
 Code:
Do
  'Do you want to quit? (Y/N) '
  Get $Answer
  @CRLF
Until $Answer = 'Y'
This example is controlled by external data, and must execute at least once. It will keep looping until the user enters "Y".
Here's similar code with While/Loop
 Code:
$DefaultAnswer = 'N' ; usually set by reading a config file
$Answer = $DefaultAnswer
While $Answer <> 'Y'
  'Do you want to quit? (Y/N) '
  Get $Answer
  @CRLF
Loop
Here, if the defuault answer is Y, the loop will never process at all. You can try the second example with $DefaultAnswer set to "Y" to see the difference.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D