- DarkLight
Integer and Float Operators
- DarkLight
Integer and float operators are used to compare numerical values. Integers are whole numbers without decimal points (e.g., 5, -3), while floats are numbers with decimal points (e.g., 5.5, -3.14). Floats allow for a more precise representation of values.
Integer and float help in checking whether a number is equal to, greater than, or less than another number, among other conditions. The following table describes the integer and float operators with examples.
Operator | Description | Example |
---|---|---|
is equal to | Checks if the number field matches exactly with another static number. | Age is equal to 30 |
is not equal to | Checks if the string does not match another string. | Age is not equal to 50 |
is empty | Checks if the numeric value is empty (has no value). | Amount is empty |
is not empty | Checks if the numeric value is not empty (contains a value). | Amount is not empty |
is less than | Checks if the number is smaller than another number. | Temperature is less than 75 |
is greater than | Checks if the number is larger than another number. | Salary is greater than 10000 |
is less than or equal to | Checks if the number is smaller than or equal to another number. | Price is less than or equal to 100 |
is greater than or equal to | Checks if the number is larger than or equal to another number. | Quantity is greater than or equal to 10 |
between | Checks if the number falls within a specified range. | Age is between 20 and 30 |
not between | Checks if the number does not fall within a specified range. | Temperature is not between 30 and 60 |
in | Checks if the number matches any value in a list.
| Number is in (1, 2, 3) |
not in | Checks if the number does not match any value in a list.
| Number is not in (4, 5, 6) |
is anything | Checks if the number has any value assigned (including zero). | Age is anything (true if age has a value) |
is same | Checks if the value of an integer field is the same as the specified integer. | Age is same as Years of Experience |
Revenue is same as Target Amount | ||
is different | Checks if the value of an integer field is different from the specified integer field. | Age is different from Years of Experience |
Revenue is different from Target Amount | ||
greater than | Checks if the number is greater than the value of another number. | Sales (1200) > Target Sales (1000) |
less than | Checks if the number is less than the value of another number. | Expenses (800) < Budget (1000) |
greater than or is equal to | Checks if the number is greater than or equal to the value of another number. | Revenue (5000) ≥ Minimum Requirement (5000) |
less than or is equal to | Checks if the number is less than or equal to the value of another number. | Hours Worked (35) ≤ Max Hours (40) |