Function Coerce Make Class

MakeBooleanFast

"Make String From Boolean (Fast)" or "Coerce Boolean To String" Coerce a Boolean value into a 2-character string. Return the two-character string whose bytes have the same in-memory representation as the Boolean value vValue. Faster version of the MakeBoolean function which has restrictive argument types (to avoid argument fix-up overhead).

Signature (Visual Basic / VBA)

Public Function MakeBooleanFast( _
    ByVal vValue As Boolean _
    ) As String

Code Example

    MakeBooleanFast(True) = Chr$(255) + Chr$(255)
    MakeBooleanFast(False) = Chr$(0) + Chr$(0)
    MakeBooleanFast(1234) = Chr$(255) + Chr$(255)
    MakeBooleanFast(0) = Chr$(0) + Chr$(0)

Parameters

Parameter Description
vValue The Boolean value whose bytes are to be interpreted as a string.

Notes & Version History

Note This function converts the string representation of the value to Unicode using the default code page of the system.
v1.3 Change Removed 16-bit support from this function.