Re: why use fprintf / size_t instead of printf/ int
From: Vesa Siivola (vsiivola_at_cc.hut.fi)
Date: 02/14/05
- Next message: Christian Kandeler: "Re: Strange problem on GCC - PLEASE HELP!!"
- Previous message: Christian Kandeler: "Re: double to int conversion yields strange results"
- In reply to: Keith Thompson: "Re: why use fprintf / size_t instead of printf/ int"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 14 Feb 2005 10:05:58 +0200 (EET)
Keith Thompson <kst-u@mib.org> wrote:
: Use size_t for what? You didn't quote anything from the previous
: article, and I can't find it on my news server (and you didn't even
: post through google).
I could not find the original question either, just some flaming
follow-ups. I guess it was a bit pointless to even reply to such an
old message anyways. Good thing you guessed the original question
right.
: The base address is of a pointer type, not of type size_t. It's
: likely to be the the same size as a size_t, but whether any conversion
: is required, and how much (if anything) it costs, is system-specific.
You are right. Again, just guessing, its probably less likely that a
size_t should be converted than int. But this is just nitpicking.
: There may be good reasons to use size_t rather than int as an array
: index, but this kind of micro-optimization isn't one of them.
I agree.
Vesa
- Next message: Christian Kandeler: "Re: Strange problem on GCC - PLEASE HELP!!"
- Previous message: Christian Kandeler: "Re: double to int conversion yields strange results"
- In reply to: Keith Thompson: "Re: why use fprintf / size_t instead of printf/ int"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|