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

Variant To VB Const Expression Function
Convert Values Class

Public Function VariantToVBConstExpression( _
    ByVal vValue As Variant _
    ) As String

"Variant To Visual Basic Constant Expression"
Return the string representation of any type of value as it would appear within Visual Basic code.

Examples:
    VariantToVBConstExpression(False) = "False"
    VariantToVBConstExpression(CInt(2)) = "2%"
    VariantToVBConstExpression(CSng(2)) = "2!"
    VariantToVBConstExpression(CByte(2)) = "2%" ' #4
    VariantToVBConstExpression(#4/5/96#) = "#4/5/96#"
    VariantToVBConstExpression("Word") = """Word"""
    VariantToVBConstExpression(Null) = "Null"
See also:
    VariantToVBEvalExpression Function
    EqualQuotedValue Function
    DoubleQuoteString Function
    CStr Function (Visual Basic)
Note: Bytes represented with the Integer type character as in example #4.

vValue: The value whose Visual Basic source code representation will be returned. Function generates an error when passed things like object pointers which have no string representation.

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