Fermat
Search
K

Comparators

Supported comparison operators:
  • Equal is, ==, =
  • Not equal is not, <>
  • Less than <
  • Less or equal than <=
  • Greater than >
  • Greater or equal than >=
  • Contains [structure] contains [value] - works for structures
  • In [value] in [structure] - works for structures
  • Empty [structure] is empty - works for structures
Let's compare some numbers:
1 < 2
3 >= 4
Output:
> true
> false
Now, let's compare pieces of text:
"hello" is "hello world!"
"ai" is not "blockchain"
Output:
> false
> true
You can also check whether a list is empty or not:
[1,2,3] is empty
[1,2,"numbers"] is not empty
Output:
> false
> true
To end up, let's check whether a word is contained in a text:
"Hello Fermat!" contains "Fermat"
"Godel" in "Escher & Bach"
Output:
> true
> false
We also allow comparison between similar structures, but comparison between different structures will always return false.