## while

   'while' <value>|<const> 'eq'|'ne'|'=='|'!='|'<'|'>' <value>|<const>

A command to compare two values ('valu' or constant numbers). If the compare is True the following commands are executed until the 'endwhile' command is found. This procedure is repeated until the compare is False.

while arg1 == arg2

will repeat the commands between 'while' and 'endwhile' until the numerical value stored in 'arg1' is not equal to the numerical value stored in value 'arg2'. The values are locally converted to 'float' format for the numerical comparison. The 'eq' and 'ne' compare strings and should not be used for numerical values since no conversion to a common format is done. Two strings are equal if they have the same length and all characters are equal.

See also “if”, “valu”, “stack” and “How to run cgx in batch mode”.