

#line                Preprocessing Directive                #line




Reset line number

#lliinnee _n_u_m_b_e_r _n_e_w_l_i_n_e
#lliinnee _n_u_m_b_e_r _f_i_l_e_n_a_m_e _n_e_w_l_i_n_e
#lliinnee _m_a_c_r_o_s _n_e_w_l_i_n_e

#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,  #lliinnee _n_u_m_b_e_r,
resets the current line number in the source file to number.  The
second, #lliinnee  _n_u_m_b_e_r _f_i_l_e_n_a_m_e, resets the  line number to number
and changes  the name of the file to  filename.  The third, #lliinnee
_m_a_c_r_o_s,  contains  macros  that  have  been  defined  by  earlier
preprocessing directives.  When  the macros have been expanded by
the preprocessor, the #lliinnee 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 yyaacccc uses #lliinnee instructions to link the C code it generates
with the yyaacccc code written by the programmer.

























COHERENT Lexicon                                           Page 1


