Xref: utzoo comp.lang.c:28580 comp.unix.wizards:21885 alt.sources:1860 comp.sources.d:5308 misc.misc:9703 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!decuac!shlump.nac.dec.com!tkou02.enet.dec.com!diamond From: diamond@tkou02.enet.dec.com (diamond@tkovoa) Newsgroups: comp.lang.c,comp.unix.wizards,alt.sources,comp.sources.d,misc.misc Subject: Re: __LINE__ (was #define DEBUG...) Message-ID: <1655@tkou02.enet.dec.com> Date: 9 May 90 09:47:33 GMT References: <11290@hoptoad.uucp> <40628@cornell.UUCP> <801@oz.rci.dk> <1990May8.183211.2661@mdivax1.uucp> Reply-To: diamond@tkou02.enet.dec.com (diamond@tkovoa) Followup-To: comp.lang.c Organization: Digital Equipment Corporation Japan , Tokyo Lines: 16 In article <1990May8.183211.2661@mdivax1.uucp> mdivax1!robinson (Jim Robinson) writes: >In article <801@oz.rci.dk> kc@oz.rci.dk (Knud Christensen) writes: >>... >># define DTRACE fprintf(stderr, "Trace line %d\n", __LINE__) >>... >Isn't the use of __LINE__ non-portable? In ANSI, __LINE__ may be used this way and the implementation has to make the correct substitution (and the program may not #define or #undefine __LINE__). So the answer is almost "No, it is portable." However, the correct answer is "Yes, there still aren't many ANSI-conformant compilers yet." -- Norman Diamond, Nihon DEC diamond@tkou02.enet.dec.com This_blank_intentionally_left_underlined________________________________________