Operators work alongside functions to evaluate logical expressions and perform calculations. There are both text and numeric comparison operators, as outlined below.
1. In order for us to follow-up with you, please enter your email below.
type: text table
datatype: email
rows:
1. Enter E-Mail Address
2. Confirm E-Mail Address
validation: $Q1R1 eq $Q1R2 {message: Please ensure your email addresses are the same.}
2. And please enter your age.
type: integer
size: 3
validation: $Q2>=18 {message: Earlier your indicated that you were at least 18 years old}
In the example above, T1 ensures that both email addresses entered are the same, and Q2 validates that the age entered is greater than or equal to 18.
Text comparison operators
The following operators are used for evaluating or comparing text strings. If used with numbers, these operators treat the numbers as text strings rather than numeric values.
Operator | Meaning | Notes |
gt |
Greater than |
Based on lexicographical (a.k.a. dictionary) order |
ge |
Greater than or equal to |
Based on lexicographical order |
lt |
Less than |
Based on lexicographical order |
le |
Less than or equal to |
Based on lexicographical order |
eq |
Equal to |
Case-sensitive |
ne |
Not equal to |
Case-sensitive |
=~ |
Pattern matching; pattern found |
|
!~ |
Pattern matching; pattern not found |
|
Numeric comparison operators
Numeric comparison operators are used for evaluating and comparing numerical values in programming and data analysis.
Operator | Meaning |
> |
Greater than |
>= |
Greater than or equal to |
< |
Less than |
<= |
Less than or equal to |
== |
Equal to |
!= |
Not equal to |
Comments
0 comments
Please sign in to leave a comment.