[TUHS] // comment in C++

arnold at skeeve.com arnold at skeeve.com
Fri Feb 10 19:30:40 AEST 2017

Dave Horsfall <dave at horsfall.org> wrote:

> On Thu, 9 Feb 2017, Dan Cross wrote:
> > Well, it wasn't in c89, but it's been part of ANSI C since 1999: almost 20
> > years!
> Not in my C book 2nd ed. (ANSI), it isn't...
>     A2.2 Comments
>     The characters /* introduce a comment, which terminates with the 
>     characters */.  Comments do not not nest, and they do not occur within 
>     string or character literals.
> There is no mention of "//"; I have the 51st printing, August 2013.

Sadly, although it's a recent printing, the contents date from 1989,
only covering the first standard for C. C99 is the second, and C11 is
the third.

(My first printing of the 2nd edition from 1989 has "draft ANSI" or some
such on the cover. :-)


More information about the TUHS mailing list