Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Path | csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Keith Thompson <kst-u@mib.org> |
| Newsgroups | comp.lang.c |
| Subject | Re: What is the output of this program ? |
| Date | Mon, 13 Jul 2015 14:16:52 -0700 |
| Organization | None to speak of |
| Lines | 25 |
| Message-ID | <lnmvyzlpvf.fsf@kst-u.example.com> (permalink) |
| References | <b3e47c82-8ba3-4d5d-bf40-6f87a390b15a@googlegroups.com> <mluk3u$nk3$1@dont-email.me> <kfnr3oeyam1.fsf@x-alumni2.alumni.caltech.edu> <mo197q$al6$1@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Injection-Info | mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="12684"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19lnL9QibCt+CIKBrY8mLUt" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
| Cancel-Lock | sha1:dgpHTczc1iTCcuUI6nNy3YPCebs= sha1:9LSFV1EbCw+xH7gdUfsRPWMknB0= |
| Xref | csiph.com comp.lang.c:65524 |
Show key headers only | View raw
Richard Heathfield <rjh@cpax.org.uk> writes:
> On 11/07/15 16:31, Tim Rentsch wrote:
>> Richard Heathfield <rjh@cpax.org.uk> writes:
>>
>>> The correct way to /print/ size_t values, however, is not %d,
>>> but %zd.
>>
>> Isn't this contrary to your rule of limiting yourself
>> to constructs common to C90, C99 and C11? ;)
>
>
> My answer was posited on the basis that the code was C99 (because of
> anonymous wossnames, which I incorrectly thought were not supported by
> C90). In writing what I would consider to be maximally portable code, I
> would not use %z at all. But, if (as I incorrectly thought) one is using
> C99 anyway, one might as well take advantage of %z.
I mentioned this before, but the correct format for size_t is "%zu", not
"%zd" (since size_t is an unsigned type).
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What is the output of this program ? Rahul Kumar <rahulkumar5july@gmail.com> - 2015-06-18 06:45 -0700
Re: What is the output of this program ? James Kuyper <jameskuyper@verizon.net> - 2015-06-18 10:10 -0400
Re: What is the output of this program ? Richard Heathfield <rjh@cpax.org.uk> - 2015-06-18 15:22 +0100
Re: What is the output of this program ? Keith Thompson <kst-u@mib.org> - 2015-06-18 08:07 -0700
Re: What is the output of this program ? Richard Heathfield <rjh@cpax.org.uk> - 2015-06-18 16:11 +0100
Re: What is the output of this program ? Ralf Damaschke <rwspam@gmx.de> - 2015-06-18 18:48 +0000
Re: What is the output of this program ? Richard Heathfield <rjh@cpax.org.uk> - 2015-06-18 23:01 +0100
Re: What is the output of this program ? Tim Rentsch <txr@alumni.caltech.edu> - 2015-07-11 08:31 -0700
Re: What is the output of this program ? jadill33@gmail.com - 2015-07-13 07:51 -0700
Re: What is the output of this program ? Tim Rentsch <txr@alumni.caltech.edu> - 2015-07-15 02:51 -0700
Re: What is the output of this program ? jadill33@gmail.com - 2015-07-15 05:55 -0700
Re: What is the output of this program ? Tim Rentsch <txr@alumni.caltech.edu> - 2015-07-20 10:01 -0700
Re: What is the output of this program ? Richard Heathfield <rjh@cpax.org.uk> - 2015-07-13 22:07 +0100
Re: What is the output of this program ? Keith Thompson <kst-u@mib.org> - 2015-07-13 14:16 -0700
Re: What is the output of this program ? Tim Rentsch <txr@alumni.caltech.edu> - 2015-07-15 02:11 -0700
Re: What is the output of this program ? Richard Heathfield <rjh@cpax.org.uk> - 2015-07-15 10:58 +0100
Re: What is the output of this program ? Tim Rentsch <txr@alumni.caltech.edu> - 2015-07-20 10:05 -0700
Re: What is the output of this program ? James Kuyper <jameskuyper@verizon.net> - 2015-06-18 12:26 -0400
Re: What is the output of this program ? Keith Thompson <kst-u@mib.org> - 2015-06-18 10:14 -0700
csiph-web