Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: newlines in string constants Message-ID: <6527@brl-smoke.ARPA> Date: Wed, 7-Oct-87 21:19:16 EDT Article-I.D.: brl-smok.6527 Posted: Wed Oct 7 21:19:16 1987 Date-Received: Sat, 10-Oct-87 12:19:59 EDT References: <2669@xanth.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 19 In article <2669@xanth.UUCP> kyle@xanth.UUCP (Kyle Jones) writes: >char *s = "This is\n\ >legal."; Still legal under ANSI C; the escaped new-line is removed from the source character stream very early in the translation process. >char *s = "This is >not legal."; Still not legal under ANSI C; the stuff after "= " on the first line does not constitutre a valid preprocessing-token. There is yet another way to do what you want under ANSI C, using the new feature of concatenation of adjacent string literals: char *s = "This is\n" "legal too."; Ths has the advantage that you don't have to start the word "legal" on the left margin.