Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!mcvax!hp4nl!orcenl!bengsig From: bengsig@oracle.nl (Bjorn Engsig) Newsgroups: comp.lang.c Subject: Re: case sensitive identifiers (Was: Re: Just Wondering) Message-ID: <318.nlhp3@oracle.nl> Date: 26 Apr 89 13:04:02 GMT References: <13159@dartvax.Dartmouth.EDU> <10088@smoke.BRL.MIL> <1314@ns.network.com> Reply-To: bengsig@oracle.nl (Bjorn Engsig) Organization: ORACLE Europe, The Netherlands Lines: 27 In article <1314@ns.network.com> ddb@ns.UUCP (David Dyer-Bennet) writes: > >How DO people feel about identifiers differing only in casing? Is this >ok? To be COMPLETELY avoided? To be avoided except in a very few >well-understood conventional cases? > One of the more common cases where you use identifiers only different in case is for union fields inside structures, e.g.: struct abc { int a, b, c; union { char Array[4]; long Whole; } wa_union; }; #define array wa_union.Array #define whole wa_union.Whole which allows you to rerefence the union fields in your program without having to supply the union name, i.e. abcvar.array[2] in stead of abcvar.wa_union.Array[2]. -- Bjorn Engsig, ORACLE Europe \ / "Hofstadter's Law: It always takes Path: mcvax!orcenl!bengsig X longer than you expect, even if you Domain: bengsig@oracle.nl / \ take into account Hofstadter's Law"