COHERENT manpages
This page displays the COHERENT manpage for #line [Reset line number].
List of available manpages
Index
#line -- Preprocessing Directive 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 ANSI Standard, §6.8.4 Notes Most often, #line is used to ensure that error messages point to the correct line in the program's source code. A program generator may use this directive to associate errors in generated C code with the original sources. For example, the program generator yacc uses #line instructions to link the C code it generates with the yacc code written by the programmer.