These predicate functions perform various numeric comparisons and either succeed returning a null string or cause statement failure. Any of these functions can be redefined by the user.
EQ(a,b) or eq(a,b) succeeds if the numeric values of a and b are equal, and fails otherwise. The arguments must be convertible to numeric values.
GE(a,b) of ge(a,b) succeeds if the numeric value of a is greater than or equal to that of b, and fails otherwise. The arguments must be convertible to numeric values.
GT(a,b) or gt(a,b) succeeds if the numeric value of a is greater than that of b, and fails otherwise. The arguments must be convertible to numeric values.
INTEGER(a) or integer(a) succeeds if the argument a is convertible to an integer, and fails otherwise.
LE(a,b) or le(a,b) succeeds if the numeric value of a is less than or equal to that of b, and fails otherwise. The arguments must be convertible to numeric values.
LT(a,b) or lt(a,b) succeeds if the numeric values of a is less than that of b, and fails otherwise. The arguments must be convertible to numeric values.
NE(a,b) or ne(a,b) succeeds if the numeric value of a and b are not equal, and fails otherwise. The arguments must be convertible to numeric values.
Note that the floating point NAN (Not A Number) cannot be compared so it will terminate your program with an error. Use the ISNAN, IDENT or DIFFER predicate functions described next when testing for a NAN.
Prior Page, Next Page, First Page of the Oregon SNOBOL5 Reference