Click here to Skip to main content
Click here to Skip to main content

"if" with no code block parenthesis

By , 10 Feb 2011

Alternatives

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

12 Feb 2011  
PrafullaVedante 3 alternatives  
 
Avoid using "if" with no code block parenthesis
17 Feb 2011  
paladin_t
 
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(...) ...

License

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 | Mobile
Web01 | 2.8.140415.2 | Last Updated 10 Feb 2011
Article Copyright 2011 by Andrew Rissing
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid