• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Outputting an unsigned long long
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: cocoa-dev digest, Vol 2 #816 - 15 msgs
  • Next by Date: Re: calling a shell script from an objective C application
  • Previous by thread: RE: Outputting an unsigned long long
  • Next by thread: NSData weirdness...
  • Index(es):
    • Date
    • Thread