• 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: NSString format specifiers (was: Is Concatenation that complex?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString format specifiers (was: Is Concatenation that complex?)


  • Subject: Re: NSString format specifiers (was: Is Concatenation that complex?)
  • From: Philippe Mougin <email@hidden>
  • Date: Wed, 28 Apr 2004 22:23:42 +0200

>> As far as %z, it doesn't appear to be an ANSI C format specifier,
>> so I guess that would fall under the category of enhancement
>> request as well :)
>
> I have it from "man 3 printf" which says:
> STANDARDS
> Subject to the caveats noted in the BUGS section below, the fprintf(),
> printf(), sprintf(), vprintf(), vfprintf(), and vsprintf() functions con-
> form to ANSI X3.159-1989 (``ANSI C'') and ISO/IEC 9899:1999
> (``ISO C99''). With the same reservation, the snprintf() and vsnprintf()
> functions conform to ISO/IEC 9899:1999 (``ISO C99'').
>
> BUGS
> [...] The conversion formats %D, %O, and %U are not standard
> and are provided only for backward compatibility [...]
>
> I do not have the ANSI-C standard, so I do not know what to
> put into this. But googling for the subject turned up:
> http://h21007.www2.hp.com/dspp/tech/tech_TechSingleTip
> DetailPage_IDX/ 1,2366,198,00.html which says:
>
> How to portably print pointers and size_t values
> [...] Fortunately, ANSI C provides printf format
> specifiers that solve this problem cleanly [...]
> Values of type size_t should use the Z size
> modifier [...]

"z" is actually part of the ISO standard, as a length modifier in printf-style format strings. I'm not sure about the status and meaning of the "Z" (uppercase) which is described in the quoted text...

Best,

Philippe Mougin
http://www.fscript.org - The open-source scripting language for Cocoa.
_______________________________________________
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: Panel items failing to draw
  • Next by Date: Grabing Disk Information
  • Previous by thread: Failed Dictionary Search yields Signal 10 (SIGBUS) when all I want is a nil.
  • Next by thread: Grabing Disk Information
  • Index(es):
    • Date
    • Thread