Next: lcmb
Up: Commands
Previous: help
Contents
if
'if' <value> 'eq'|'ne'|'=='|'!='|'<'|'>' <value>
This keyword is used to compare two values. If the compare is True the following commands are executed. If the compare is False the code after 'else' is executed. Normal operation continues after 'endif':
if arg1 == arg2
will skip successive commands when the nummerical value stored in 'arg1' is not equal to the nummerical value stored in value 'arg2'. The values are locally converted to 'float' format for the nummerical comparison. The 'eq' and 'ne' compare strings and should not be used for nummerical 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 ``while'', ``valu'', ``stack'' and ``How to run cgx in batch mode''.
root
2016-03-04