Navigation
Synopsis Greater than or equal operator on values.
Syntax Exp1 >= Exp2
Types
Exp1 Exp2 Exp1 >= Exp2
value value bool
Description By brute force, a total less than operator between two values V1 and V2 of arbitrary types T1 and T2 is defined:
  • If the types T1 and T2 can be compared then V1 less than V2 is used.
  • Otherwise values are ordered according their type name, for instance, int is smaller than list, and map is smaller than rel.
Greater than or equal yields true if the value of Exp2 is strictly less than (according to the ordering defined above) the value of Exp1 or if both values are equal, and false otherwise.
Examples Introduce two variables X, Y and Z and force them to be of type value:
rascal>value X = "def";
value: "def"
rascal>value Y = "abc";
value: "abc"
rascal>value Z = 3.14;
value: 3.14
Now compare X and Y:
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.