DMC-1400 Series Command Reference <, >, =, <=, >=, <> 11
<, >, =, <=, >=, <>
FUNCTION: Comparison Operators
DESCRIPTION:
The comparison operators are as follows:
< less than
> greater than
= equals
<= less than or equal
>= greater than or equal
<> not equals
These are used in conjunction with IF, JP, JS, ( ), &, and | to perform conditional jumps. The
result of a comparison expression can also be printed with MG or assigned to a variable.
ARGUMENTS: (n < m) or (n > m) or (n = m) or (n <= m) or (n >= m) or (n <> m) where
n and m are signed numbers in the range -2147483648 to 2147483647
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage ALL
RELATED COMMANDS:
( ) Parentheses
IF If statement
JP Jump
JS Jump subroutine
EXAMPLES:
IF (x > 2) & (y = 4)
MG “true”
ENDIF
;x must be greater than 2 and y equal to 4 for the message to print