Thursday, August 19, 2010 [Tweets] [Favorites]

Type-Savvy Logging Macro

Vincent Gable has written a nifty macro that, given an expression, prints the code for the expression and the expression’s value, no matter whether it’s an object, scalar, or struct. For example, LOG_EXPR(self.window.frame.size) prints self.window.frame.size = {320, 480}. No need to type format strings or conversion functions.

Comments

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment