Click here to Skip to main content
12,558,802 members (63,054 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


3 bookmarked

"if" with no code block parenthesis

, 10 Feb 2011 CPOL
Always review all changes before submitting them. Especially, if using a global find and replace.


Members may post updates or alternatives to this current article in order to show different approaches or add new features.

12 Feb 2011
3 alternatives  
Avoid using "if" with no code block parenthesis
17 Feb 2011
Whatever, I agree with you, it would be worse in C / C++ code using macros.Suppose you got a multiline macro like this:#define some_macro \ do_something_1(); \ do_something_2();And using this macro without parenthesis:if(...) some_macro;orfor(...) ...


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Andrew Rissing
Software Developer (Senior)
United States United States
Since I've begun my profession as a software developer, I've learned one important fact - change is inevitable. Requirements change, code changes, and life changes.

So..If you're not moving forward, you're moving backwards.

| | Privacy | Terms of Use | Mobile
Web02 | 2.8.161026.1 | Last Updated 10 Feb 2011
Article Copyright 2011 by Andrew Rissing
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid