• 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: NSLog BUG ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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>)

  • Prev by Date: Re: NSToolbar Problems...
  • Next by Date: How to launch AppleScript routine?
  • Previous by thread: NSLog BUG ?
  • Next by thread: Re: System wide Contextual Menu plug ins
  • Index(es):
    • Date
    • Thread