Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: comp.lang.c Subject: Re: newlines in string constants Message-ID: <8791@utzoo.UUCP> Date: Mon, 19-Oct-87 16:05:30 EDT Article-I.D.: utzoo.8791 Posted: Mon Oct 19 16:05:30 1987 Date-Received: Mon, 19-Oct-87 16:05:30 EDT References: <2669@xanth.UUCP> <15262@clyde.ATT.COM>, <2810@xanth.UUCP> Organization: U of Toronto Zoology Lines: 22 > ... the responses I received indicated that literal newlines > in strings are disallowed so the compiler can discover unterminated > strings early and not see the rest of the program "inside-out". There > has GOT to be a better explanation than that. Yes, the compiler would > lose its mind if you forgot a " but not any more so than when you forget > a brace or put a semicolon after a function definition. No, the string problem is worse, because it's at the lexical level where intelligent error recovery is harder. Your program may even look more or less legal inside-out! > I can write a pre-processer that allows me to have my multi-line > strings, but I would like to believe there's a better reason than the > one above for not allowing them in the language. How about "it's not C"? Or, more specifically, to use the sort of wording that X3J11 would use when rejecting such a pointless triviality: "new feature; no operational experience with it; need not convincingly shown; same effect possible with existing features". -- "Mir" means "peace", as in | Henry Spencer @ U of Toronto Zoology "the war is over; we've won". | {allegra,ihnp4,decvax,utai}!utzoo!henry