Re: "Tricks" of the "Trade"
Re: "Tricks" of the "Trade"
- Subject: Re: "Tricks" of the "Trade"
- From: jgo <email@hidden>
- Date: Sat, 16 Jun 2001 20:39:57 -0700
>
The first argument to NSLog must be a NSString, but it can take format
>
arguments similar to those of printf() and additionally it understands %@
>
which is used to print any NSObject or subclasses thereof.
>
>
int i;
>
unsigned u;
>
double f;
>
NSDictionary *dict;
>
NSLog(@"An integer %d unsigned %u double %f object %@", i, u, f, dict);
Whatever happened to:
NSLog(@"An integer %d unsigned %u double %lf object %@", i, u, f, dict);
and
long laramie;
float fred;
NSLog(@"octal %-#6lo hex %-#8lx HEX %-#10lX", laramie, laramie, laramie);
NSLog(@"float %+#14.3f double %+#28.8f varwidth %-*d", fred, f, i, u);
John G. Otto Nisus Software, Engineering
www.infoclick.com www.mathhelp.com www.nisus.com software4usa.com
EasyAlarms PowerSleuth NisusEMail NisusWriter MailKeeper QUED/M
My opinions are probably not those of Nisus Software, Inc.