Top "Unions" questions

The plural of a keyword in the C family of languages for declaring a union data type.

How to initialize a union?

If it's a struct then it can be done *p = {var1, var2..}; But seems this doesn't work with union: union …

c unions
Union initialization in C++ and C

I have built a working C library, that uses constants, in header files defined as typedef struct Y { union { struct …

c++ c initialization unions c++03
Anonymous union within struct not in c99?

here is very simplified code of problem I have: enum node_type { t_int, t_double }; struct int_node { int …

c gcc struct c99 unions
error: aggregate value used where an integer was expected

I am having following union union data { uint64_t val; struct{ .... } }; and I have a function func(union data mydata[]) { …

c linux printf unions format-specifiers
Do union types actually exist in python?

Since python is dynamically typed, of course we can do something like this: def f(x): return 2 if x else "…

python types unions dynamic-typing
What's the major difference between "union" and "struct" in C.?

Possible Duplicate: Difference between a Structure and a Union in C I could understand what a struct means. But, i …

c++ c struct unions
Appending/concatenating two IEnumerable sequences

I have two sets of datarows. They are each IEnumerable. I want to append/concatenate these two lists into one …

c# ienumerable unions
Is it valid to use bit fields with union?

I have used bit field with a structure like this, struct { unsigned int is_static: 1; unsigned int is_extern: 1; unsigned …

c structure bit-fields unions
C: typedef union

didn't find anything in related questions. Most probably it's super noob, but I'll ask anyway/ I've got the following in …

c typedef microcontroller unions microchip
Typescript has unions, so are enums redundant?

Ever since TypeScript introduced unions types, I wonder if there is any reason to declare an enum type. Consider the …

typescript enums unions