Re: short question but I don't know how to describe it
Re: short question but I don't know how to describe it
- Subject: Re: short question but I don't know how to describe it
- From: Nick Zitzmann <email@hidden>
- Date: Mon, 8 Mar 2010 14:55:18 -0700
On Mar 7, 2010, at 5:07 PM, Marx Bievor wrote:
> I can substitute a String with %@ and an int with %d... like in return @"Hi I am %@ and %d years old", name, age;
> what is the right command to substitute a bool and a float? I cannot find any reference at apple's docs.
You generally want to use %f for floats and doubles. An ObjC BOOL is a signed 8-bit character type, so %hhd ought to work.
> does anyone have a list of those commands?
No, but you do if you have the developer tools. Type "man 3 printf" in the terminal to see what you can do with format strings.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden