[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: What is the preferred way to embed multi-line string in C source?
- From: David Jones <drj@...>
- Date: Fri, 19 Dec 2008 16:53:42 +0000
On 19 Dec 2008, at 05:13, Rob Hoelz wrote:
I believe you can do the following:
char *luaCode = "function foo()\n"
Not ideal, but hey, it works.
Yes, adjacent literal strings just get concatenated. The portable
limit on the total length of the string as specified in the standard
is 4095 characters (in C99). If you are generating C code with a
program you can easily go past this.