English
Language : 

CC78K0S Datasheet, PDF (158/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 9 PREPROCESSING DIRECTIVES (COMPILER DIRECTIVES)
9.4 Line Control
The preprocessing directive for line control #line replaces the line number to be used by the C compiler in
translation with the number specified by this directive. If a string (character string) is given in addition to the number,
the directive also replaces the source file name the C compiler has with the specified string.
(1) To change the line number
To change the line number, the specification is made as follows. 0 and numbers larger than 32767 cannot be
specified.
#line numeric-string new-line
[Example]
#line 10
(2) To change the line number and the file name
To change the line number and file name, the specification is made as follows.
#line numeric-string "character string" new-line
[Example]
#line 10 "file1.c"
(3) To change using preprocessor token string
In addition to the specifications above, the following specification can also be made. In this case, the specified
preprocessing token string must be either one of the above two examples after all the replacement.
#line preprocessing-token-string new-line
[Example]
#define LINE_NUM 100
#line LINE_NUM
158
User’s Manual U14872EJ1V0UM