The "LT" (less than) function determines whether a value is less than another value. If the first value specified is less than the second value specified, a true (1) is returned. Otherwise, a false (0) is returned. The LT function operates in the opposite manner as the GT function. The less symbol (<) can also be used to perform this function and is the recommended method.
Category
Boolean
Syntax
LT(value1, value2) or value1 < value2
Parameters and Descriptions
Parameter | Description |
---|---|
value1 | This parameter specifies the first value to be used in the less than or equal to comparison. If this value is less than or equal to the second source value, the result is true and a one (1) is returned. The source value may be a field/column of a datastore, a literal value (i.e. ABC) or the result of another Function. |
value2 | This parameter specifies the second value to be used in the less than comparison. The value may be a field/column of a datastore, a literal value (i.e. ABC), a variable or the result of another Function. |
1 | 0 | Indicates whether a TRUE (1) or FALSE (0) was returned from the ISDEC function. |
Example
Compare each employee’s yearly salary (YR_WAGE) to determine who is being paid $75,000 or less per year. If the condition is true (1), set the variable WITHIN_RANGE to the constant Y. Otherwise, set the variable WITHIN_RANGE to the constant N.
IF HRS_WORKED < '41'
{
OT_REQ = 'N'
}
ELSE
{
OT_REQ = 'Y'
}