07.05.2012, 13:12, "Oswald Buddenhagen" <oswald.buddenha...@nokia.com>: > On Mon, May 07, 2012 at 01:00:21PM +0400, ext Konstantin Tokarev wrote: > >> void foo() >> { >> #ifdef foo >> doSomething(); >> #ifdef bar >> bar(); >> #else >> notBar(); >> #endif >> #endif >> } > > void foo() > { > #ifdef foo > doSomething(); > # ifdef bar > bar(); > # else > notBar(); > # endif > #endif > } > > works, too. > just see the hash in the first column as a different "syntax space" > (which it is), and then it makes perfect sense.
I think that good code should be readable without syntax highlighting, and for me it's easier to identify #directive in code than hash in first column and directive somewhere in the middle of line between C++ code. Your mileage may vary though. -- Regards, Konstantin _______________________________________________ Qt-creator mailing list Qt-creator@qt-project.org http://lists.qt-project.org/mailman/listinfo/qt-creator