Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.std.c Subject: Re: comment style Message-ID: <17791:Jan804:24:4691@kramden.acf.nyu.edu> Date: 8 Jan 91 04:24:46 GMT References: <1050:Jan701:40:4791@kramden.acf.nyu.edu> <616@caslon.cs.arizona.edu> <1640@inews.intel.com> Organization: IR Lines: 16 In article <1640@inews.intel.com> bhoughto@hopi.intel.com (Blair P. Houghton) writes: > Likewise. TeX ignores newlines, unless you tell it not to, > as for example by placing a comment there, which it then ignores. No, TeX doesn't ignore newlines. Sorry I didn't explain this well enough the first time. Here's a complete parser for TeX's end-of-line % comment mechanism: When you see %, read and throw away characters until newline. Throw away the newline as well. Continue. For a programming language it's probably better to replace the newline with a space than to concatenate the lines around it, for the same reason that /*foo*/ becomes a space in (non-cpp) C. But the point is that this mechanism handles both comments and continuations in one fell swoop. ---Dan