Category
Type specifiers
Syntax
union [<union type name>] { <type> <variable names> ; ... } [<union variables>] ;
Description
Use unions to define variables that share storage space.
The compiler allocates enough storage in a_number to accommodate the largest element in the union.
Unlike a struct, the members of a union occupy the same location in memory. Writing into one overwrites all others.
Use the record selector (.) to access elements of a union .
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|