A comparison is composed of 2 expressions on the sides of the one of the following operators: <, >, <=, >=, =, != and <>.
There are 3 kinds of comparisons: numeric, string, and object comparisons.
The left and right side expressions of the comparison can contain numbers, links, and constant links to inputs/outputs that are not string or object, sub-expressions, operators and functions.
When the left or right side of the comparison is a simple link and the other side is a simple identifier, the identifier is implicitly considered as one of the constants of the linked input/output. If it is not, it is considered as a sub-expression.
Suppose we have an input speed with 3 constants: Low, Medium, and High.
The following example is valid because Low is a constant of Speed.
The following example is invalid because maxSpeed is a sub-expression.
Either the left or right side of the comparison should be a link to a string input/output. The other side can be:
Another link to a string. A static string surrounded by "…" (no inline expression).
One of the constants of the linked input/output.
A constant link to a string.
Sub-expressions are not accepted. The only allowed operators are '=', '!=' and '<>. The following example is invalid because abc is not a constant of DecodedString and sub-expressions are not allowed.
Either the left or right side of the comparison should be a link to an object input/output. The other side can be:
Another link to an object of the same type.
One of the constants of the linked input/output.
A link to one of the constants of the linked input/output.
Sub-expressions are not accepted.
The only allowed operators are '=', '!=' and '<>'.
The following example is invalid because you cannot compare objects of different types.
The following 2 examples are valid because All is a constant of SearchRegion.
The following example is invalid because abc is not a constant of SearchRegion and sub-expressions are not allowed.
Cascade comparisons are not supported. The following 2 examples are invalid.
To make these 2 examples valid, parentheses are required.