Re: Outputting an unsigned long long
Re: Outputting an unsigned long long
- Subject: Re: Outputting an unsigned long long
- From: Cameron Hayne <email@hidden>
- Date: Fri, 21 Jun 2002 11:15:39 -0400
Sherm Pendley wrote:
> Try %qd, %qu or %qx:
I certainly can't argue with results. :-)
But, where's that documented? I looked for it in the printf man page, a
C99 reference book, the NSLog() function description, the NSString class
docs, and the Strings programming topic, and didn't see a 'q' modifier
mentioned in any of them.
I also initially missed it in the printf man page - because I did 'man
printf' instead of 'man 3 printf' and so got the man page for the
program /usr/bin/printf - which I didn't know existed before!
Back to the original problem:
%q.. seems to be a BSDism ("quad int")
%q.. does work correctly with NSLog, NSString stringWithFormat:, printf,
etc
So that is fine and solves the OP's problem.
But it seems to me that it is a bug that NSLog & NSString
stringWithFormat: don't correctly handle the %ll prefix
(e.g. %llu)
Note that printf, sprintf, etc do correctly handle %llu
... Cameron
--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.