Next: , Previous: , Up: comparisons   [Index]


1.17.3 Terminology and conventions

A comparison procedure is a Scheme procedure of two arguments returning an exact integer in {-1, 0, 1} such that the valid input values are ordered according to some total order. A comparison procedure, together with a set of Scheme values to which it is applicable, represents a comparison function.

A comparison is either an expression applying a comparison procedure to two values, or the result of such an expression.

Each operation (macro or procedure) processing the value of a comparison checks if the value is indeed an exact integer in the set {-1, 0, 1}. If this is not the case, an error is signalled.

Comparison procedures expecting certain types of arguments should raise an error in case the arguments are not of this type.