RAD Studio
ContentsIndex
PreviousUpNext
>, <, >=, <= Relational Operators

Syntax

relational-expression  <   shift-expression
relational-expression  >   shift-expression
relational-expression  <=  shift-expression
relational-expression  >=  shift-expression

Use relational operators to test equality or inequality of expressions. If the statement evaluates to be true it returns a nonzero character; otherwise it returns false (0).

Relational Operator 
Description 
>  
greater than  
<  
less than  
>=  
greater than or equal to  
<=  
less than or equal to  

In the expression:

E1 <operator> E2 

the operands must follow one of these conditions:

  • Both E1 and E2 are of arithmetic type.
  • Both E1 and E2 are pointers to qualified or unqualified versions of compatible types.
  • Either E1 or E2 is a pointer to an object or incomplete type, and the other is a pointer to a qualified or unqualified version of void.
  • Either E1 or E2 is a pointer, and the other is a null pointer constant.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!