Compares two values.

Syntax

Result = SRP_Math("COMPARE", Value1, Value2, DecimalPlaces, ScientificNotation)

Returns

Comparison result of Value1 and Value1.

Remarks

The COMPARE operation compares Value1 to Value2 and returns the results as an integer. If Value1 is less than Value2, then -1 is returned. If Value1 is greater than Value2, then 1 is returned. If the two values are identical, then 0 is returned.

You can specify COMP for short.

Example

// Compare PI to E 
Val1 = "3.1415926535897932384626433832795" 
Val2 = "2.7182818284590452353602874713527" 
Result = SRP_Math("COMPARE", Val1, Val2) 
!! Result = 1 (Val1 is greater)!!
  • No labels