# <!-- var kmNextPage = "armclang_ref_dom1359731182592.htm"; var kmPrevPage = "armclang_ref_dom1359731181912.htm"; var kmNextPageTitle = "Boolean operators"; var kmPrevPageTitle = "Addition, subtraction, and logical operators"; var kmBreadCrumbs = "<a href=\"default.htm\">Home</a> &raquo; <a href=\"armclang_ref_ibj1564391772668.htm\">armasm Legacy Assembler Reference</a> &raquo; <a href=\"armclang_ref_dom1359731172022.htm\">Symbols, Literals, Expressions, and Operators in a</a> &raquo; Relational operators"; kmSetupPaging (); kmNavButtons(); //--> Relational operators

## F5.25 Relational operators

Relational operators 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}`.

The following table shows the relational operators:

Table F5-7 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