manpagez: man pages & more
info texinfo
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

19.6.1 ‘#line’ Directive

An input line such as this:

@hashchar{}line 100 "foo.ptexi"

indicates that the next line was line 100 of the file ‘foo.ptexi’, and so that’s what an error message should refer to. Both M4 (see Preprocessor features in GNU M4) and CPP (see Line Control in The C Preprocessor, and Preprocessor Output in The C Preprocessor) can generate such lines.

The makeinfo program recognizes these lines by default, except within @verbatim blocks (see section @verbatim: Literal Text. Their recognition can be turned off completely with CPP_LINE_DIRECTIVES (see section Other Customization Variables), though there is normally no reason to do so.

For those few programs (M4, CPP, Texinfo) which need to document ‘#line’ directives and therefore have examples which would otherwise match the pattern, the command @hashchar{} can be used (see section Inserting ‘#’ with @hashchar{}). The example line above looks like this in the source for this manual:

@hashchar{}line 100 "foo.ptexi"

The @hashchar command was added to Texinfo in 2013. If you don’t want to rely on it, you can also use @set and @value to insert the literal ‘#’:

@set hash #
@value{hash}line 1 "example.c"

Or, if suitable, an @verbatim environment can be used instead of @example. As mentioned above, #line-recognition is disabled inside verbatim blocks.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on October 2, 2013 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.