compare()

Scalar. Determines which of two values is larger.

Syntax

compare ( value1, value2 )

Parameters

value1

Any datatype.

value2

Any datatype.

Usage

The function returns an integer (1, -1, or 0). If the first value is larger, the function returns 1. If the second value is larger, the function returns -1. If they are equal, it returns 0.

Example

compare ( (asin(0.5), (acos(0.5) ) returns -1.