Morgan wrote a good article which discussed how debugger works. You can check
this entry here(This article is in Chinese ).
I noticed one code in Morgan’s comments:
#ifdef _DEBUG
#define LOG_INFO(format, str) do { printf(format, str); } while (0)
#else
#define LOG_INFO(format, str)
#endif
So, do you know why he use “do {} while (0)” instead of “{}” ?
Here’s the explanation:
do..while(0) […]
Archive for the 'Others' Category
Just read Ray Ozzie’s post of “Really Simple Sharing” and many comments, mark it here.
“Microsoft XML News” - Tim Bray
“Sharing at so many levels!” - Dave Winer
“Microsoft proposal: Simple Sharing Extensions for RSS and OPML” - Alex Barnett
“RSS + OPML/ SSE = Really Simple Synchronization”
And here’s the SSE spec
Simple Sharing Extensions for RSS and OPML
