Navigation
Synopsis Equal operator on values.
Syntax Exp1 == Exp2
Types
Exp1 Exp2 Exp1 == Exp2
value value bool
Description Yields true if both arguments are identical and false otherwise.
Examples Introduce two variables X, Y and Z and force them to be of type value:
rascal>value X = "abc";
value: "abc"
rascal>value Y = "abc";
value: "abc"
rascal>value Z = 3.14;
value: 3.14
Now compare X and Y for equality:
rascal>X == Y;
bool: true
and X and Z:
rascal>X == Z;
bool: false
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.