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

Coerce To Single Fast Function
Coerce Make Class

Public Function CoerceToSingleFast( _
    ByVal vString As String _
    ) As Single

"Coerce String To Single (Fast)"
Return the Single value whose in-memory representation is the same as the first 4 (four) characters in string vString.
Similar to the CVS function in earlier versions of Microsoft Basic.
Faster version of the CoerceToSingle function which has restrictive argument types (to avoid argument fix-up overhead).

Examples:
    CoerceToSingleFast(String$(8, 0)) = 0!
    CoerceToSingleFast(String$(8, 1)) = 2.369428E-38!
    CoerceToSingleFast(String$(8, 2)) = 9.551468E-38!
See also:
    CoerceToSingle Function
    MakeSingleFast Function
vString: The string whose first four characters are to be interpreted as a Single value.
Note: Function does NOT generate an error if vString less than or greater than four characters long.
Note: If vString is more than four characters long, the leftmost four characters are coerced to a Single value.

Note: This function first converts the string from Unicode to 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.