[TUHS] // comment in C++

Warner Losh imp at bsdimp.com
Thu Feb 9 14:38:52 AEST 2017


On Wed, Feb 8, 2017 at 7:46 PM, Dave Horsfall <dave at horsfall.org> wrote:
> On Wed, 8 Feb 2017, Corey Lindsly wrote:
>
>> > I'm quite taken by BIND, though, which accepts
>> >
>> > /* this */
>> > // this
>> > # and this.
>>
>> Not that.
>>
>> ; But this.
>
> Perhaps I meant named.conf (part of BIND):
>
>     named.conf is the configuration file for named. Statements are enclosed
>     in braces and terminated with a semi-colon. Clauses in the statements
>     are also semi-colon terminated. The usual comment styles are supported:
>
>     C style: /* */
>
>     C++ style: // to end of line
>
>     Unix style: # to end of line
>
> Where did you get
>
>     ; But this?

Old School assembler comments. This found its way into a number of
config files long after most uses of Old School assembler had moved
on...

Macro-16 is where I first encountered it, but it is much older. It is
common in DEC syntax, and some others.

Warner


More information about the TUHS mailing list