View Full Version : Line Continuation Character in MPLAB?
brianafischer
25-01-2007, 19:58
Does MPLAB support the line continuation character? I searched the C18 User's Guide to no avail with the phrase "continuation".
A google search brought up this (http://forum.microchip.com/tm.aspx?m=36440&mpage=1&key=阉) result, but it looks like they are using macros...
Thanks,
Mark McLeod
25-01-2007, 22:44
A C statement can be spread over as many lines as you like without involving any special characters, so I'm not sure I understand your question.
Shinigami2057
25-01-2007, 23:07
Yeah, unless you are using macros there's no need for the line continuation char (which is \ ). If you want to break a string over multiple lines you can do
printf("Start of the line"
"Continuation");
without any special chars.
I have nothing to add about continuations, but
printf("Start of the line"
"Continuation");
produces
Start of the lineContinuation
Have to put a space inside one of the quotes so the non-programmers can understand it.:cool:
Roger.
brainonska
27-01-2007, 19:26
there are no continuation characters if i get your question right...
there are "discontinuation" characters as escape sequences...
all printf statements will print out their arguments on the same line unless you tell it explicitly not too. For example, the following code...
printf("Some say UNIX\nhath daemons");
//will output:
Some say UNIX
hath daemons
Its because when the compiler reads '\n' it knows not to print it, but to start a new line. This is an escape sequence and there are others (i.e. \t ).
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.