• 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: Newbie warning: watch your NSLog data types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie warning: watch your NSLog data types


  • Subject: Re: Newbie warning: watch your NSLog data types
  • From: Guy English <email@hidden>
  • Date: Tue, 9 Aug 2005 14:48:18 -0400

> It would be very nice if there were an NSLog debug mode that did
> (limited) type checking on arguments.  I am still trying to figure
> out how to write that - any 16 bits is a valid int16, which is not
> easy to debug.

This can't be checked at run-time because of the way the varargs stuff
works. I believe GCC can do some printf format checking during parsing
and give warnings. Can't remember the details off the top of my head
but you may be able to declare a function with an attribute saying to
check the args for printf style type correctness. Whether or not it'll
gracefully handle Cocoa-extended printf formats I don't know.

Take care,
Guy
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Newbie warning: watch your NSLog data types (From: Scott Ellsworth <email@hidden>)

  • Prev by Date: NSData writeToFile:atomically not working right??
  • Next by Date: Re: NsColorWell Connection Issue
  • Previous by thread: Newbie warning: watch your NSLog data types
  • Next by thread: NSData writeToFile:atomically not working right??
  • Index(es):
    • Date
    • Thread