Help needed with #include problems

Christoph Kuenkel ckl at uwbln.UUCP
Thu May 26 20:55:22 AEST 1988


In article <998 at mit-caf.UUCP>, vlcek at 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 at tub.BITNET
Kantstr. 152				uunet!unido!tub!ck
1000 Berlin 12				{unido,tmpmbx,uwnue,bk35,tub}!uwbln!ckl
West Germany
-- 
Christoph Kuenkel			ck at tub.BITNET
Kantstr. 152				uunet!unido!tub!ck
1000 Berlin 12				{unido,tmpmbx,uwnue,bk35,tub}!uwbln!ckl
West Germany



More information about the Comp.lang.c mailing list