On Tuesday 24 June 2003 9:14 pm, you wrote: > At 3:57 PM -0400 6/24/03, Sebastian Voges wrote: > >On Tue, 24 Jun 2003 15:44:38 -0400, Kevin OKeefe wrote: > >> this slash '\' is continuation not '/'... > > > >I guess depending on the compiler it interprets '??/' as a'\' > >from: http://www.gotw.ca/gotw/086.htm > > IANALL, but... > > Both trigraph replacement and comment removal take place before > lexical analysis. However, I'm not sure where it's defined that the > former takes place before the latter. If the latter takes place > first, then the ??/ would not be a \. > > Section 6.4.9, para 2, of the C standard says that comments are not > scanned except for EOLs. So perhaps trigraphs are NOT supposed to be > parsed in comments. > > Then again, perhaps this is all different for C++. > > -- Keith
Referring to aforementioned p228, it states that (excuse my paraphrasing): Preprocessing takes place through several logical phases: 1. Trigraph sequence replacement 2. Each occurance of the backslash character followed by a new line is swallowed 3. The program is tokenised, and comments replaced by a single space. 4. ...etc I know this edition predates the ANSI standard, but according to the billing on the front cover, it is based on the Draft Proposed ANSI C. Rgds., Paul -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/