Outputting a BOOL in NSLog

by Josh Highland on August 6, 2010

xcode Outputting a BOOL in NSLog

Ever wanted to use NSLog in the iPhone SDK to see the value of a BOOL? Heck I have! “How do you do it”, you say? Just like this:

NSLog(@"BOOL =  %@\n", (boolVar ? @"YES" : @"NO"));

Then again, I don’t use NSLog anymore, I use DebugLog

  • digg Outputting a BOOL in NSLog
  • facebook Outputting a BOOL in NSLog
  • stumbleupon Outputting a BOOL in NSLog
  • twitter Outputting a BOOL in NSLog
  • delicious Outputting a BOOL in NSLog
  • reddit Outputting a BOOL in NSLog
  • friendfeed Outputting a BOOL in NSLog
  • posterous Outputting a BOOL in NSLog
  • tumblr Outputting a BOOL in NSLog

Leave a Comment

Previous post:

Next post: