Unassigned returns 0
returns 0
returns empty string
returns False
Null raises exception
raises exception
raises exception
raises exception
Out-of-range assignments often result in the target variable getting the highest value in its range. Invalid variant
operations, assignments or casts raise an EVariantError exception or an exception class decending from
EVariantError.
Special conversion rules apply to the TDateTime type declared in the
System
unit. When a TDateTime is converted
to any other type, it treated as a normal Double. When an integer, real, or Boolean is converted to a TDateTime, it
is first converted to a Double, then read as a date-time value. When a string is converted to a TDateTime, it is
interpreted as a date-time value using the regional settings. When an
Unassigned
value is converted to TDateTime,
it is treated like the real or integer value 0. Converting a
Null
value to TDateTime raises an exception.
On the Win32 platform, if a variant references a COM interface, any attempt to convert it reads the object's default
property and converts that value to the requested type. If the object has no default property, an exception is raised.
94