Derek Robert Price <derek@ximbiot.com> writes:
Do you know when split strings began being supported? C89?
Yup.
There was much contention and debate during drafts of the ANSI C
standard, but I am fairly sure that ANSI/ISO 9899-1990 (aka C89) is the
first one to force the behavior (section 6.1.4 "String Literals").
Where the grammer is
Syntax:
string-literal
"s-char-sequence[opt]"
L"S-char-sequence[opt]"
s-char-sequence:
s-char
s-char-sequence s-char
s-char
any member of the source character set except
the doulbe quote ("), backslash (\), or new-line character
escape-sequence
So you will note that the new-line character has never actually been
a formal part of the string-literal without being escaped. It is only
in recent compilers that this is being enforced.
In ISO/IEC-9899-1999 (aka C99), the same syntax is provided (but it is
now in section 6.4.5 String Literals). The only real change is that the
text of the description and semantics has been expanded for
clarification and the single-quote clarified as having two
representations (either "'" or "\'").