This shows you the differences between two versions of the page.
— |
c:datatypes:union [2024/02/16 01:05] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== union ====== | ||
+ | |||
+ | create groups of variables which share the same storage space.\\ | ||
+ | a union is similar to a struct, but it allows you to define variables that share storage space\\ | ||
+ | |||
+ | <code c> | ||
+ | union [union-type-name] | ||
+ | { | ||
+ | type variable-names; | ||
+ | type variable-names; | ||
+ | ... | ||
+ | } [union-variables] ; | ||
+ | </code> |