<-- Previous || Up || Next -->

Make Integer Function
Coerce Make Class

Public Function MakeInteger( _
    ByVal vValue As Variant _
    ) As Variant

"Make String From Integer" or "Coerce Integer To String"
Coerce an Integer value into a 2-character string.
Return a two-character string containing the in-memory representation of the Integer value vValue.
Similar to coercing an integer value into character string in the C language.
Same as the MKI function in earlier versions of Microsoft Basic.
Inverse of the CoerceToInteger function.

Examples:
    MakeInteger(0) = Chr$(0) + Chr$(0)
    MakeInteger(1) = Chr$(1) + Chr$(0)
    MakeInteger(2) = Chr$(2) + Chr$(0)
    MakeInteger(2.7) = Chr$(3) + Chr$(0)
    MakeInteger(256) = Chr$(0) + Chr$(1)
    MakeInteger(-1) = Chr$(255) + Chr$(255)
    MakeInteger("2") = Chr$(2) + Chr$(0)
    IsNull(MakeInteger(Null)) = True
See also:
    MakeIntegerFast Function
    CoerceToInteger Function
    MakeLong Function
    LOBYTE Function
    HIBYTE Function
vValue: The Integer value whose bytes are to be interpreted as a string. vValue can be a numeric value, a date value, a numeric string, or a date string. Function returns Null if vValue is Null. Function returns an empty string if vValue cannot be fixed up to a number.

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.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.