Monarch 9460 Printer User Manual


 
Command Reference 5-47
Comparison
can be one of the following:
Comparison
Description
= Equals
== Equals
<> Not equal
!= Not equal
> Greater than
>= Greater than or equal
< Less than
<= Less than or equal
Optional Fields ELSEIF provides another set of commands to execute if another condition exists.
For example,
IF NAME == "JOHNSON"
INC JCOUNT
ELSEIF NAME == "SMITH"
INC SCOUNT
ENDIF
counts the number of records where NAME is Johnson or Smith. The first condition
is (NAME equals Johnson). The second condition is (NAME equals SMITH).
Use ELSE to provide a final set of commands to execute if no conditions exist.
Example
This example checks the value of TASTATE. If it contains OHIO, the first MOVE
command copies TASTATE to PASTATE. Otherwise, the second MOVE command
copies the string "Out of State" to PASTATE.
IF TASTATE == "OHIO"
MOVE TASTATE,PASTATE
ELSE
MOVE "Out of State",PASTATE
ENDIF
See Also COMPARE
SWITCH
WHILE