Sunday, 15 January 2012

c - Regarding to c99, What is the definition of a logical source line? -



c - Regarding to c99, What is the definition of a logical source line? -

imagine write code:

printf ("testtest" "titiritest%s", " test");

would according iso/iec:9899 §5.1.1.2 — 2

be 3 different logical source lines or single one?

and

2. each instance of backslash character (\) followed new-line character deleted, splicing physical source lines form logical source lines. lastly backslash on physical source line shall eligible beingness part of such splice. source file not empty shall end in new-line character, shall not preceded backslash character before such splicing takes place.

the rule mentioned forming logical source lines?

as regarding

5.2.4.1 translation limits

[...]

— 4095 characters in logical source line

would mean each translation unit should not bigger 4095 characters, long dont utilize \ right before our line breaks. , i'm pretty sure, thats not intend say.

so piece of definition i'm missing lookup?

it's 3 logical source lines.

logical source lines of import because macro definitions must fit one logical source line; cannot right think of other utilize logical source lines of more 1 line. build big string literals, either utilize logical source lines consisting of more 1 physical source line (which find ugly), or relying on fact quoted strings concatenated, much more readable , maintainable .

c c99

No comments:

Post a Comment