CVar Function |
No
CVar(expression)
expression
Use: Required
Data Type: Numeric or String
Same range as Double for numerics. Same range as String for non-numerics.
expression cast as a Variant.
Returns expression as a Variant data type; the data subtype is automatically selected by the CVar routine.
There really aren't any rules: you can literally throw anything at CVar, and a variant of the appropriate data subtype is returned.
Use CVar only in situations where you are confident that the data type you pass into the function isn't ambiguous; in other words, where you can be sure of the data subtype that CVar selects. If you need data of a particular data type, use the appropriate conversion function.