Function Windows API Class

CoerceBooleanToInteger

Coerce a Boolean value into an Integer value. Return the Integer value whose bytes have the same in-memory representation as the Boolean value vValue.

Signature (Visual Basic / VBA)

Public Function CoerceBooleanToInteger( _
    ByVal vValue As Boolean _
    ) As Integer

Code Example

    CoerceBooleanToInteger(True) = -1
    CoerceBooleanToInteger(False) = 0

Parameters

Parameter Description
vValue The Boolean value whose bytes are to be interpreted as an Integer.

Notes & Version History

Note We are not sure if this function has any use, but we included it to be consistent and complete.