All Downloads are FREE. Search and download functionalities are using the official Maven repository.

reference.language.equality.html Maven / Gradle / Ivy




    
    Equality expressions
    
    

    
    

    
    

    
    
    
    

    


Equality expressions

Equality expressions are used to check for equality (or inequality) of 2 values.
An equality expression is a code fragment which produces a Boolean value, which can then be used as an input for other operations: print, write, method call and so forth.
In the context of programming, equality can have 2 meanings, whether 2 values are the same computable object, or the values themselves are actually equal.

Checking equality of objects

Checking equality of objects is done using the is operator.
Inequality of objects is checked using the is not operator.
In the below example, a and b refer to the same value.
On the other hand, a and c refer to different values (although those values are equal).

Checking equality of values

Comparing equality of values is done using the = operator in E, or the == operator in O or M.
Inequality of values is checked using the <> operator in E, or the != operator in O or M.
In the below example, a and b have the same value.
On the other hand, a and c have different values.

Checking rough equality of values

Strict equality is not always desirable. For example "hello" and "HELLO" are not equal values.
However, it is sometimes desirable to treat them as equal.
Rough equality applies to Text values only (this may be extended in the future).
Rough equality of values is checked using the ~ operator in E, or the ~= operator in O or M.

Checking equality of user defined values

Prompto supports user defined equality. See categories for details.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy