This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
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