Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!amdcad!sun!pitstop!sundc!seismo!uunet!mcvax!unido!tub!uwbln!ckl From: ckl@uwbln.UUCP (Christoph Kuenkel) Newsgroups: comp.lang.c Subject: Re: Help needed with #include problems Message-ID: <455@uwbull.uwbln.UUCP> Date: 26 May 88 10:55:22 GMT References: <28400001@ntvax> <6104@sigi.Colorado.EDU> <2955@ihlpe.ATT.COM> <998@mit-caf.UUCP> Organization: UniWare GmbH, Berlin Lines: 20 Posted: Thu May 26 11:55:22 1988 In article <998@mit-caf.UUCP>, vlcek@mit-caf.UUCP (Jim Vlcek) writes: > I am under the impression that there is nothing wrong with having an > ``extern'' reference *and* a variable definition in the source file, > and in fact I have done so in all of my C programming. So my #include > files contain only ``extern'' references; I declare (and initialize) > the variable in the proper source file, somewhere after the #include > statement. Putting initialization data for a global variable into an > #include file seems to me almost an act of violence! I agree totally! Unfortunately, there are many compilers which do not :-( So regardless what whatever standard or K&R says, its *not* portable. -- Christoph Kuenkel ck@tub.BITNET Kantstr. 152 uunet!unido!tub!ck 1000 Berlin 12 {unido,tmpmbx,uwnue,bk35,tub}!uwbln!ckl West Germany -- Christoph Kuenkel ck@tub.BITNET Kantstr. 152 uunet!unido!tub!ck 1000 Berlin 12 {unido,tmpmbx,uwnue,bk35,tub}!uwbln!ckl West Germany