Keil Logo Arm Logo

Relational operators

Relational operators

Table 31 shows the relational operators. These act on two operands of the same type to produce a logical value.

The operands can be one of:

  • numeric

  • PC-relative

  • register-relative

  • strings.

Strings are sorted using ASCII ordering. String A is less than string B if it is a leading substring of string B, or if the left-most character in which the two strings differ is less in string A than in string B.

Arithmetic values are unsigned, so the value of 0>-1 is {FALSE}.

Table 31. Relational operators

Operator

Alias

Usage

Explanation

=

==

A=B

A equal to B

>

 

A>B

A greater than B

>=

 

A>=B

A greater than or equal to B

<

 

A<B

A less than B

<=

 

A<=B

A less than or equal to B

/=

<> !=

A/=B

A not equal to B


Show/hideSee also

Copyright © 2007-2008, 2011-2012 ARM. All rights reserved.ARM DUI 0379D
Non-ConfidentialID062912

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.