From mboxrd@z Thu Jan 1 00:00:00 1970 From: cym224@gmail.com (Nemo) Date: Thu, 9 Feb 2017 21:46:25 -0500 Subject: [TUHS] // comment in C++ In-Reply-To: References: <466b9b582736cb809ecabc7702b74914b27be4b6@webmail.yaccman.com> <20170209115922.GH5418@yeono.kjorling.se> Message-ID: On 9 February 2017 at 20:58, Dave Horsfall 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. Hhmmm... I do not have ANSI C99 (or C11) but ISO/IEC 9899:TC3 states (in Para. 6.4.9): Except within a character constant, a string literal, or a comment, the characters // introduce a comment that includes all multibyte characters up to, but not including, the next new-line character. N. > > -- > Dave Horsfall DTM (VK2KFU) "Those who don't understand security will suffer."