Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ #line — Preprocessing Directives — Coherent 3.1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought


#line                Preprocessing Directive                #line




Reset line number

#line number newline
#line number filename newline
#line macros newline

#line is  a preprocessing directive  that resets the  line number
within  a file.   The ANSI  Standard defines  the line  number as
being the number of newline characters read, plus one.

#line  can take  any of  three forms.   The first,  #line number,
resets the current line number in the source file to number.  The
second, #line  number filename, resets the  line number to number
and changes  the name of the file to  filename.  The third, #line
macros,  contains  macros  that  have  been  defined  by  earlier
preprocessing directives.  When  the macros have been expanded by
the preprocessor, the #line instruction will then resemble one of
the first two forms and be interpreted appropriately.

***** See Also *****

C preprocessor

***** Notes *****

Most often, #line is used  to ensure that error messages point to
the correct line in  the program's source code.  A program gener-
ator may  use this directive  to associate errors  in generated C
code with the  original sources.  For example, the program gener-
ator yacc uses #line instructions to link the C code it generates
with the yacc code written by the programmer.

























COHERENT Lexicon                                           Page 1


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026