Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!oddjob!gargoyle!ihnp4!homxb!mtuxo!mtune!codas!usfvax2!ateng!chip From: chip@ateng.UUCP (Chip Salzenberg) Newsgroups: comp.lang.c Subject: Re: newlines in string constants Message-ID: <56@ateng.UUCP> Date: Wed, 21-Oct-87 18:58:09 EST Article-I.D.: ateng.56 Posted: Wed Oct 21 18:58:09 1987 Date-Received: Sun, 25-Oct-87 04:39:21 EST References: <2669@xanth.UUCP> <15262@clyde.ATT.COM> <2810@xanth.UUCP> Reply-To: chip@ateng.UUCP (Chip Salzenberg) Organization: A.T. Engineering, Tampa, FL Lines: 26 In article <2810@xanth.UUCP> kyle@xanth.UUCP (Kyle Jones) writes: >In article <2669@xanth.UUCP>, I state that I would like to see >multi-line strings like: > >char *s = "This is >not legal."; > >[...] I want the compiler to take everything that appears between >the double quotes literally, with the exception of the usual backslash >escapes. My text editor knows how many spaces there are after "is", so >the compiler certainly shouldn't have any problem grasping this. But this is not true of all text editors. The construct you propose is just as troublesome as imbedding real tab characters in quoted strings. Some text editors translate tabs to spaces, strip trailing spaces, let you edit, and translate leading spaces to tabs. Even if you say that this kind of editor should be banished, there are still all those mailers out there that strip trailing white space. Don't you want your source file to be mailable after you shar it? -- Chip Salzenberg "chip@ateng.UUCP" or "{uunet,usfvax2}!ateng!chip" A.T. Engineering My employer's opinions are not mine, but these are. "Gentlemen, your work today has been outstanding. I intend to recommend you all for promotion -- in whatever fleet we end up serving." - JTK