CitectVBA Programming Reference > Understanding CitectVBA Language Basics > Variables > Numbers in Variants

Numbers in Variants

When storing numbers in variant variables, the data type used is the most compact type possible. For example, if you first assign a whole number to the variant it will be stored as an integer or long. If you assign a number with a fractional component, it is stored as a single or double.

For doing numeric operations on a variant variable, it is sometimes necessary to determine if the value stored is a valid numeric, thus avoiding an error. This can be done with the IsNumeric( ) function.

See Also

CitectVBA Data Types

Variables

Constants

Strings

Numbers

CitectVBA Function Reference