Re: NSLog BUG ?
Re: NSLog BUG ?
- Subject: Re: NSLog BUG ?
- From: email@hidden
- Date: Wed, 15 May 2002 11:18:47 -0700
Mark's Studio wrote:
|I just used NSLog like this
|
|NSLog(@"takeDoubleValueFrom %d %@ %@",[sender doubleValue],self,sender);
|
|and the second arg was always (NULL)
|
|...
|
|why does it not work?
Because the %d format item expects an *integer*, not a floating-point value. Here, "d" is for "decimal", not for "double". The "%d" format duly printed the first four bytes of your value as an integer, and used the remaining four bytes for the first "%@" format.
Glen Fisher
_______________________________________________
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.
References: | |
| >NSLog BUG ? (From: "Mark's Studio" <email@hidden>) |