next up previous index
Next: Logical Up: Expressions Previous: Arithmetics

Comparison

ComparisonExpression ::= 
	       Expression "<"   Expression | 
	       Expression "<="  Expression | 
	       Expression "="   Expression | 
	       Expression ">="  Expression | 
	       Expression ">"   Expression | 
	       Expression "<>"  Expression |
	       Expression "<@"  Expression | 
	       Expression "<=@" Expression | 
	       Expression "=@"  Expression | 
	       Expression ">=@" Expression | 
	       Expression ">@"  Expression | 
	       Expression "<>@" Expression

Comparing integers or real numbers work as expected. Comparing character strings is based on the lexical order. Comparing lists is based on the following rules:

Except for integers and reals, mixed comparisons are not supported.

      The comparison operators with a postfix arobas ``@'' apply to character string arguments only, and compares them in a case-independent fashion. For instance, the following assertions apply:

ASSERT "Hello" <> "HELLO";
ASSERT "Hello" =@ "HELLO";
ASSERT "artist" > "Zorro";
ASSERT "artist" <@ "Zorro";