Need help with union trick: summary of replies

Bjorn Engsig bengsig at oracle.nl
Tue Jan 15 02:27:18 AEST 1991


In article <1991Jan12.190021.16071 at nntp-server.caltech.edu> gceych at juliet.caltech.edu writes:
|
|Besides, I happen to LIKE this particular construct for nested structures and
|unions (as an option).  I hate remembering the names of all the intermediates.
There is another wellknown trick for this, where you use dummy names for the
union inside the struct and union members and then

#define nice_name dummy_union_name.dummy_nice_name

so you can write mystruct.nice_name and really make your compiler see
mystruct.dummy_union_name.dummy_nice_name
-- 
Bjorn Engsig,         E-mail: bengsig at oracle.com, bengsig at oracle.nl
ORACLE Corporation    Path:   uunet!orcenl!bengsig

            "Stepping in others footsteps, doesn't bring you ahead"



More information about the Comp.lang.c mailing list