Path: utzoo!attcan!uunet!cs.utexas.edu!sun-barr!decwrl!shelby!polya!shap From: shap@polya.Stanford.EDU (Jonathan S. Shapiro) Newsgroups: comp.lang.c++ Subject: Re: C++ Comments Message-ID: <9385@polya.Stanford.EDU> Date: 23 May 89 08:42:29 GMT References: <6957@brunix.UUCP> <24700@agate.BERKELEY.EDU> Sender: Jonathan S. Shapiro Reply-To: shap@polya.Stanford.EDU (Jonathan S. Shapiro) Organization: Stanford University Lines: 18 In article <24700@agate.BERKELEY.EDU> chapman@eris.berkeley.edu (Brent Chapman) writes: >In article <6957@brunix.UUCP> sdm@cs.brown.edu (Scott Meyers) writes: >>Consider the following C++ source line: >> >> //********************** >> >>How should this be treated by the C++ compiler? According to the C++ lang. definition, this is a single comment extending to the end of the line. Remember, however, that a translator-based implementation applies the C preprocessor first, which sees the /*... and eliminates it before the compiler gets a shot at the input. Moral of the story is: don't do this. Whether it's right or wrong, it isn't portable. Jon