Next: , Previous: Quoted strings, Up: Syntax


2.3 Comments in m4 input

Comments in m4 are normally delimited by the characters `#' and newline. All characters between the comment delimiters are ignored, but the entire comment (including the delimiters) is passed through to the output—comments are not discarded by m4.

Comments cannot be nested, so the first newline after a `#' ends the comment. The commenting effect of the begin-comment string can be inhibited by quoting it.

     `quoted text' # `commented text'
     =>quoted text # `commented text'
     `quoting inhibits' `#' `comments'
     =>quoting inhibits # comments

The comment delimiters can be changed to any string at any time, using the builtin macro changecom. See Changecom, for more information.