Previous Topic

Book Contents

Book Index

Next Topic

cmp

Function 'cmp' compares two objects and returns an integer according to the outcome.

  • If object1 < object2 then cmp(object1, object2) => -1
  • If object1 == object2 then cmp(object1, object2) => 0
  • If object1 > object2 then cmp(object1, object2) => 1

The function handles null arguments, a null argument is considered as the smallest value of all.

  • If object1 is null and object2 is any not null value then cmp(object1, object2) => -1
  • If object1 is null and object2 is null then cmp(object1, object2) => 0
  • If object1 is any not null value and object2 is null then cmp(object1, object2) => 1

See Also

Available Functions

cast

countService

countService2

currencyConversion

dayOfMonth

ge (greater or equals than), ge_

gt (greater than), gt_

le (less or equals than), le_

lt (less than), lt_

eq (equals), eq_ and cmp

ne_

evalCondition

evalExpression

pyeval

not

isNull

Null

getAttributeTranslation

getAuditedBOTranslation

getAuditedValueRelation

getBOTypeTranslation

getCurrentDate

getCurrentTime

getCurrentTimeStamp

getCurrentUserld

getMaximalTimeStamp

getMaximalDate

getParameter

getPicture()

getValuesetTranslation

if, case and coalesce

trimLeft

isValid

max

min

month

round

size

substring

sum

trim

trimRight

replaceFromEnd

unit conversion

translate

valueset

year