comments.html revision 15a44745412679c30a6d022733925af70a38b715
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--
- Copyright (C) 1999, 2000 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
- DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
- FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-->
<HTML>
<HEAD>
<TITLE>BIND Comment Syntax</TITLE>
</HEAD>
<BODY>
<H2>BIND Configuration File Guide--Comment Syntax</H2>
<HR>
<A NAME="Syntax"><H3>Syntax</H3></A>
<PRE>
/* 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
</PRE>
<A NAME="Usage"><H3>Definition and Usage</H3></A>
<P>Comments may appear anywhere that whitespace may appear in a BIND
configuration file.</P>
<P>C-style comments start with the two characters <CODE>/*</CODE>
(slash, star) and end with <CODE>*/</CODE> (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.</P>
<P>C-style comments cannot be nested. For example, the following is
not valid because the entire comment ends with the first
<CODE>*/</CODE>:
<PRE>
/* 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. */
</PRE>
<P>C++-style comments start with the two characters <CODE>//</CODE>
(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
<CODE>//</CODE> pair. For example:
<PRE>
// This is the start of a comment. The next line
// is a new comment, even though it is logically
// part of the previous comment.
</PRE>
<P>Shell-style (or perl-style, if you prefer) comments start with the
character <CODE>#</CODE> (hash or pound or number or octothorpe or
whatever) and continue to the end of the physical line, like C++
comments.</P> For example:
<PRE>
# This is the start of a comment. The next line
# is a new comment, even though it is logically
# part of the previous comment.
</PRE>
<P><STRONG>WARNING:</STRONG> you cannot use the <CODE>;</CODE>
(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.</P>
<HR>
<CENTER><P>[ <A HREF="config.html">BIND Config. File</A>
| <A HREF="http://www.vix.com/isc/bind.html">BIND Home</A>
|&nbsp;<A HREF="http://www.isc.org">ISC</A> ]</P></CENTER>
<HR>
<ADDRESS>
Last Updated: $Id: comments.html,v 1.3 2000/07/27 09:42:11 tale Exp $
</ADDRESS>
</BODY>
</HTML>