Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!brl-tgr!internet!William LeFebvre From: William LeFebvre Newsgroups: net.lang.c Subject: Re: line comments (## vs. //) Message-ID: <6072@brl-tgr.ARPA> Date: Mon, 26-Nov-84 09:26:56 EST Article-I.D.: brl-tgr.6072 Posted: Mon Nov 26 09:26:56 1984 Date-Received: Wed, 28-Nov-84 04:00:19 EST Sender: news@brl-tgr.ARPA Organization: Ballistic Research Lab Lines: 25 > > Couldn't you use something like > > > > # define // /* > > Doesn't work! C'mon Doug. The least you could have done is explained why! The ## and // comments are "here-to-end-of-line" comments (thus the name "line comments"). They behave in a fashion similar to the # character in the assembler. When a ## or // appears on a line, it means "everything from here to the newline is a comment." Now you should see why the #define won't work. Where will you get the */ from? BTW: // was used for comments in one of C's ancestors ... BCPL! I could get used to that type of comment again with little problem. But I don't understand the motivation behind such a switch. Is it because people miss the line commenting ability? Is it just because some people think /* */ is too ugly? Or has someone actually been bitten by the expression "c = *a/*b;" ??? :-) William LeFebvre Department of Computer Science Rice University