Skip to content

IntIsOdd

IntIsOdd

Description

Test whether the integer is odd.

Parameters

Name Direction Description
value in Integer to test

Usage example (from documentation)

  bool odd = IntIsOdd(&value);

Returns

true when the least-significant bit is one.

Usage example (Cross-references)

Usage examples (Cross-references)
    }
    
    bool IntIsOdd(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