Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!decvax!ima!haddock!karl From: karl@haddock.ISC.COM (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Caution for those considering MSC 5.0 Message-ID: <2635@haddock.ISC.COM> Date: 18 Feb 88 19:39:17 GMT References: <11754@brl-adm.ARPA> <620@viper.Lynx.MN.Org> <278@ho7cad.ATT.COM> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 14 In article <278@ho7cad.ATT.COM> ekb@ho7cad.ATT.COM (Eric K. Bustad) writes: >As a matter of style, however, I agree with John that one should explicitly >initialize any variable if your code makes any use of its initial value. I sometimes use the opposite approach: if I have an object of static duration whose initial value is irrelevant, I may emphasize this fact by writing e.g. "int x = ARB;". Usually I do this within partially-initialized aggregates: "static struct foo x = { &y, 4L, '\0', ARB };", which indicates that the missing member will be filled in by the subsequent code. (The value of ARB is, of course, truly arbitary; I generally #define it as 0 so that it can be used to initialize either numbers or pointers.) Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint