DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

BIND Configuration File Guide--Comment Syntax


Syntax

/* This is a BIND comment as in C */

// This is a BIND comment as in C++

# This is a BIND comment as in common Unix shells and perl

Definition and Usage

Comments may appear anywhere that whitespace may appear in a BIND configuration file.

C-style comments start with the two characters /* (slash, star) and end with */ (star, slash). Because they are completely delimited with these characters, they can be used to comment only a portion of a line or to span multiple lines.

C-style comments cannot be nested. For example, the following is not valid because the entire comment ends with the first */:

/* This is the start of a comment.
   This is still part of the comment.
/* This is an incorrect attempt at nesting a comment. */
   This is no longer in any comment. */

C++-style comments start with the two characters // (slash, slash) and continue to the end of the physical line. They cannot be continued across multiple physical lines; to have one logical comment span multiple lines, each line must use the // pair. For example:

// This is the start of a comment.  The next line
// is a new comment, even though it is logically
// part of the previous comment.

Shell-style (or perl-style, if you prefer) comments start with the character # (hash or pound or number or octothorpe or whatever) and continue to the end of the physical line, like C++ comments.

For example:
# This is the start of a comment.  The next line
# is a new comment, even though it is logically
# part of the previous comment.

WARNING: you cannot use the ; (semicolon) character to start a comment such as you would in a zone file. The semicolon indicates the end of a configuration statement, so whatever follows it will be interpreted as the start of the next statement.


[ BIND Config. File | BIND HomeISC ]


Last Updated: $Id: comments.html,v 1.5 1999/09/15 20:28:00 cyarnell Exp $