public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@cygnus.com>
To: Ian.Dall@dsto.defence.gov.au
Cc: devans@cygnus.com, gas2@cygnus.com
Subject: Re: ANSI strings, comment style, ...
Date: Tue, 04 Nov 1997 16:43:00 -0000	[thread overview]
Message-ID: <199711050043.TAA27667@subrogation.cygnus.com> (raw)
In-Reply-To: <199711050040.LAA07511@hfrd015.dsto.defence.gov.au>

   Date: Wed, 5 Nov 1997 11:10:31 +1030
   From: Ian Dall <Ian.Dall@dsto.defence.gov.au>

   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);

   as

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


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.

Ian

      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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=199711050043.TAA27667@subrogation.cygnus.com \
    --to=ian@cygnus.com \
    --cc=Ian.Dall@dsto.defence.gov.au \
    --cc=devans@cygnus.com \
    --cc=gas2@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).