Skip to content

IntIsOdd

Description

Test whether the integer’s value is odd.

Parameters

Name Direction Description
value in Integer to inspect.

Success

Returns true when the integer is odd.

Failure

Returns false when the integer is even (including zero).

Usage example (Cross-references)

Usage examples (Cross-references)
    }
    
    bool IntIsOdd(const Int *value) {
        return int_is_odd(value);
    }
    
        bool result = IntIsEven(&even);
        result      = result && !IntIsOdd(&even);
        result      = result && IntIsOdd(&odd);
        result      = result && !IntIsEven(&odd);
        bool result = IntIsEven(&even);
        result      = result && !IntIsOdd(&even);
        result      = result && IntIsOdd(&odd);
        result      = result && !IntIsEven(&odd);
Last updated on