[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Variants' (#rtl)

# Reference for unit 'Variants'

Extended variants support

`uses`
`System,` |  | The system unit
`sysutils,` |  | Various system utilities.
`sysconst,` |  | Error messages
`rtlconsts,` |  | Error messages
`TypInfo;` |  | Access Run-Time Type Information (RTTI)

## Overview

The compiler has built-in support for variants, and for many operations, variants can be used without thinking about it. The system unit has built-in support for some of the basic operations on a variant, as well as some compiler helper routines. However, some operations and definitions are implemented in the Variants unit so as not to burden the system unit with routines that may not always be needed.

There is a basic set of variants that are defined by the Windows OS, these are supported by the compiler and the routines in the Variants unit. Additional variant types can be registered using the TCustomVariantType type.

The variants unit also registers a handler for setting published properties (using RTTI) using variant-typed values. Nothing needs to be done for this except including the variants unit in your program.