<s>
Variant	O
is	O
a	O
data	O
type	O
in	O
certain	O
programming	O
languages	O
,	O
particularly	O
Visual	B-Language
Basic	I-Language
,	O
OCaml	B-Language
,	O
Delphi	B-Language
and	O
C++	B-Language
when	O
using	O
the	O
Component	B-Application
Object	I-Application
Model	I-Application
.	O
</s>
<s>
It	O
is	O
an	O
implementation	O
of	O
the	O
eponymous	B-Language
concept	I-Language
in	O
computer	B-General_Concept
science	I-General_Concept
.	O
</s>
<s>
In	O
Visual	B-Language
Basic	I-Language
(	O
and	O
Visual	B-Language
Basic	I-Language
for	I-Language
Applications	I-Language
)	O
the	O
Variant	O
data	O
type	O
is	O
a	O
tagged	B-Language
union	I-Language
that	O
can	O
be	O
used	O
to	O
represent	O
any	O
other	O
data	O
type	O
(	O
for	O
example	O
,	O
integer	O
,	O
floating-point	B-Algorithm
,	O
single	O
-	O
and	O
double-precision	O
,	O
object	O
,	O
etc	O
.	O
)	O
</s>
<s>
In	O
Visual	B-Language
Basic	I-Language
,	O
any	O
variable	O
not	O
declared	O
explicitly	O
or	O
the	O
type	O
of	O
which	O
is	O
not	O
declared	O
explicitly	O
,	O
is	O
taken	O
to	O
be	O
a	O
variant	O
.	O
</s>
<s>
Among	O
the	O
major	O
changes	O
in	O
Visual	B-Language
Basic	I-Language
.NET	I-Language
,	O
being	O
a	O
.NET	O
language	O
,	O
the	O
variant	B-Language
type	I-Language
was	O
replaced	O
with	O
the	O
.NET	O
object	O
type	O
.	O
</s>
<s>
For	O
conversions	O
,	O
as	O
might	O
be	O
needed	O
if	O
Visual	B-Language
Basic	I-Language
.NET	I-Language
code	O
is	O
interacting	O
with	O
a	O
Visual	B-Language
Basic	I-Language
6	I-Language
COM	B-Application
object	I-Application
,	O
the	O
normal	O
methodology	O
is	O
to	O
use	O
.NET	B-Application
marshalling	I-Application
.	O
</s>
<s>
In	O
Visual	B-Language
Basic	I-Language
,	O
a	O
variant	O
named	O
A	O
can	O
be	O
declared	O
either	O
explicitly	O
or	O
implicitly	O
:	O
</s>
<s>
In	O
Delphi	B-Language
,	O
a	O
variant	O
named	O
A	O
is	O
declared	O
in	O
the	O
following	O
way	O
:	O
</s>
<s>
A	O
variable	O
of	O
variant	B-Language
type	I-Language
,	O
for	O
brevity	O
called	O
a	O
"	O
variant	O
"	O
,	O
as	O
defined	O
in	O
Visual	B-Language
Basic	I-Language
,	O
needs	O
16	O
bytes	O
storage	O
and	O
its	O
layout	O
is	O
as	O
follows	O
:	O
</s>
<s>
A	O
few	O
examples	O
of	O
variants	O
that	O
one	O
can	O
encounter	O
in	O
Visual	B-Language
Basic	I-Language
follow	O
.	O
</s>
<s>
2	O
The	O
type	O
of	O
a	O
NULL	O
value	O
in	O
a	O
database	O
,	O
that	O
is	O
,	O
not	O
uninitialized	O
,	O
nor	O
equivalent	O
to	O
a	O
C++	B-Language
null	O
pointer	O
.	O
</s>
<s>
The	O
data	O
would	O
be	O
an	O
interface	B-Application
pointer	O
,	O
that	O
is	O
,	O
a	O
pointer	O
to	O
a	O
pointer	O
to	O
a	O
virtual	B-Language
method	I-Language
table	I-Language
(	O
which	O
is	O
an	O
array	O
of	O
function	O
pointers	O
)	O
.	O
</s>
<s>
The	O
Collection	O
class	O
in	O
OLE	B-Application
Automation	I-Application
can	O
store	O
items	O
of	O
different	O
data	O
types	O
.	O
</s>
<s>
If	O
in	O
Visual	B-Language
Basic	I-Language
the	O
For	O
Each	O
construct	O
is	O
used	O
,	O
the	O
iterator	O
variable	O
must	O
be	O
of	O
object	O
type	O
,	O
or	O
a	O
variant	O
.	O
</s>
<s>
In	O
OLE	B-Application
Automation	I-Application
the	O
IDispatch	B-Application
interface	B-Application
is	O
used	O
when	O
the	O
class	O
of	O
an	O
object	O
cannot	O
be	O
known	O
in	O
advance	O
.	O
</s>
<s>
In	O
Visual	B-Language
Basic	I-Language
a	O
procedure	O
argument	O
can	O
be	O
declared	O
to	O
be	O
optional	O
by	O
prefixing	O
it	O
with	O
the	O
Optional	O
keyword	O
.	O
</s>
<s>
When	O
the	O
argument	O
is	O
omitted	O
Visual	B-Language
Basic	I-Language
passes	O
a	O
special	O
value	O
to	O
the	O
procedure	O
,	O
called	O
Missing	O
in	O
the	O
table	O
above	O
,	O
indicating	O
that	O
the	O
argument	O
is	O
missing	O
.	O
</s>
