<s>
In	O
distributed	B-Architecture
computing	I-Architecture
,	O
a	O
discriminator	B-Language
is	O
a	O
typed	O
tag	O
field	O
present	O
in	O
OMG	B-Architecture
IDL	B-General_Concept
discriminated	B-Language
union	I-Language
type	O
and	O
value	O
definitions	O
that	O
determines	O
which	O
union	O
member	O
is	O
selected	O
in	O
the	O
current	O
union	O
instance	O
.	O
</s>
<s>
Unlike	O
in	O
some	O
conventional	O
programming	O
languages	O
offering	O
support	O
for	O
unions	O
,	O
discriminator	B-Language
in	O
IDL	B-General_Concept
is	O
not	O
identical	O
to	O
selected	O
field	O
name	O
.	O
</s>
<s>
Here	O
is	O
an	O
example	O
of	O
IDL	B-General_Concept
union	O
type	O
definition	O
:	O
</s>
<s>
Effective	O
value	O
of	O
the	O
Register	O
type	O
may	O
contain	O
AX	O
as	O
selected	O
field	O
,	O
but	O
discriminator	B-Language
value	O
may	O
be	O
either	O
'	O
a	O
 '	O
or	O
'	O
b	O
 '	O
and	O
it	O
is	O
stored	O
in	O
memory	O
separately	O
.	O
</s>
<s>
Therefore	O
,	O
IDL	B-General_Concept
logically	O
separates	O
information	O
about	O
currently	O
selected	O
field	O
name	O
and	O
union	O
effective	O
value	O
from	O
information	O
about	O
current	O
discriminator	B-Language
value	O
.	O
</s>
<s>
In	O
the	O
example	O
above	O
,	O
discriminator	B-Language
value	O
may	O
be	O
anything	O
of	O
the	O
following	O
:	O
'	O
a	O
 '	O
,	O
'	O
b	O
 '	O
,	O
'	O
c	O
 '	O
,	O
as	O
well	O
as	O
all	O
other	O
characters	O
belonging	O
to	O
the	O
IDL	B-General_Concept
char	O
type	O
,	O
since	O
the	O
default	O
branch	O
specified	O
in	O
the	O
example	O
Register	O
type	O
allows	O
use	O
of	O
the	O
remaining	O
characters	O
as	O
well	O
.	O
</s>
<s>
The	O
Microsoft	B-Application
Interface	I-Application
Definition	I-Application
Language	I-Application
also	O
supports	O
tagged	B-Language
unions	I-Language
,	O
allowing	O
to	O
choose	O
the	O
discriminator	B-Language
via	O
an	O
attribute	B-Language
in	O
an	O
enclosing	O
structure	O
or	O
function	O
.	O
</s>
