We can compare values using C style comparison operators:
less < thanlessThan <= orEqualgreater > thangreaterThan >= orEqual
We can test two values for equality:
1 == 2 //false"2" is "2" //true
And for inequality:
1 not 2 //true"2" != "2" //false
We can test different types for equality (which will, by default, always evaluate to false
).
314 == "pi" // false123 is "123" // false
And for inequality (which will, by default, always evaluate to true
).
314 not "pi" // true123 != "123" // true
In Hades, the equality operator also works as a typecheck. You can check any value against a proto or type. The operation will return true
if the value is an instance of said proto.
123 == intv is Vector