VMS Help  —  CRTL  islessgreater
    Determines whether x is less than or greater than y.

    Format

    #include <math.h>

    int islessgreater (x, y);

1  –  Arguments

 x,y

    Values to be compared.

2  –  Description

    The function fails if one of the arguments is NaN. This causes an
    exception. To avoid this, C99 defines the macro islessgreater (x, y),
    which determines (x) < (y) || (x) > (y)  without an exception if x
    or y is NaN.

    Note:
    The islessgreater (x, y) macro is not equivalent to x!=y because that
    expression is true if x or y is NaN.

    The macro is guaranteed to evaluate the arguments only once. The
    arguments must be of real floating-point type.

    Note:
    Do not pass integer values as arguments to this macro because the
    arguments will not be promoted to real floating-point types.

3  –  Return Values

    The islessgreater (x, y) macro returns the result of the relational
    comparison.
    It returns 0 if either argument is a NaN.
Close Help