3.1.1.1.3.4 CompareSymbols

Determines the sort order of one PREFIX_CODE_SYMBOL relative to another.

Parameters

  • in PREFIX_CODE_SYMBOL a: The first PREFIX_CODE_SYMBOL.

  • in PREFIX_CODE_SYMBOL b: The second PREFIX_CODE_SYMBOL.

Return Value

Return value

Order of a relative to b

< 0

a is less than b

0

a is equivalent to b

> 0

a is greater than b

Algorithm

 if a.length < b.length
     return -1
 elseif a.length > b.length
     return 1
 elseif a.symbol < b.symbol
     return -1
 elseif a.symbol > b.symbol
     return 1
 else
     return 0
 endif