Specifications
Error! Style not defined. 729
Filename: LMAETAPA.DOC Project: MASM Environment and Tools
Template: MSGRIDA1.DOT Author: Nobody Last Saved By: Mike Eddy
Revision #: 136 Page: 729 of 45 Printed: 10/09/00 02:49 PM
HI2001 newline in constant
A string constant was continued onto a second line without either a backslash or closing
and opening quotes.
To break a string constant onto two lines in the source file, do one of the following:
u End the first line with the line-continuation character, a backslash, \.
u Close the string on the first line with a double quotation mark, and open the string on
the next line with another quotation mark.
It is not sufficient to end the first line with \n, the escape sequence for embedding a
newline character in a string constant.
The following two examples demonstrate causes of this error:
printf("Hello,
world");
or
printf("Hello,\n
world");
The following two examples show ways to correct this error:
printf("Hello,\
world");
or
printf("Hello,"
" world");
Note that any spaces at the beginning of the next line after a line-continuation character
are included in the string constant. Note, also, that neither solution actually places a
newline character into the string constant. To embed this character:
printf("Hello,\n\
world");
or