public inbox for
 help / color / mirror / Atom feed
From: Ian Lance Taylor <>
Subject: Re: ANSI strings, comment style, ...
Date: Tue, 04 Nov 1997 16:43:00 -0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

   Date: Wed, 5 Nov 1997 11:10:31 +1030
   From: Ian Dall <>

   To be honest I was not sure this was new in ANSI. We are not talking
   about cpp "#" and "##" operations. What I think we are talking about
   is writing:

		     printf("A very long string. Warning: unacceptable argument to %s instruction", insn);


		     printf("A very long string."
			    "Warning: unacceptable argument to %s instruction\n",

Yes, that sort of string concatenation is new in ANSI.

   If this is not acceptable, what is the preferred way to do this? I'd
   sooner not make it two printf's and I think

		     printf("A very long string.\
   Warning: unacceptable argument to %s instruction\n", insn);

   Is almost as ugly as just letting the line wrap.

I say, let the line wrap.  If it really bugs you, initialize a
variable and print that.

Note that you need a space between the `printf' and the open
parenthesis in your example.  In your first example, you can, and
should, put ``insn'' on the next line.


      reply	other threads:[~1997-11-04 16:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-04 15:39 Doug Evans
1997-11-04 15:46 ` Ian Lance Taylor
1997-11-04 16:43   ` Ian Dall
1997-11-04 16:43     ` Ian Lance Taylor [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).