Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!hp4nl!orcenl!bengsig From: bengsig@oracle.nl (Bjorn Engsig) Newsgroups: comp.lang.c Subject: Re: Need help with union trick: summary of replies Message-ID: <1176@nlsun1.oracle.nl> Date: 14 Jan 91 15:27:18 GMT References: <28949@mimsy.umd.edu> <2885@cirrusl.UUCP> <1991Jan12.190021.16071@nntp-server.caltech.edu> <14836@smoke.brl.mil> <1991Jan13.072418.1745@nntp-server.caltech.edu> Reply-To: bengsig@oracle.nl (Bjorn Engsig) Organization: Oracle Europe Lines: 16 In article <1991Jan12.190021.16071@nntp-server.caltech.edu> gceych@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@oracle.com, bengsig@oracle.nl ORACLE Corporation Path: uunet!orcenl!bengsig "Stepping in others footsteps, doesn't bring you ahead"