|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Collaborations and Alliances
As a CS student at CMU, I've always been told that
Code:
if(isSomeCondition == true) { ... }
Code:
if(isSomeCondition) { ... }
Code:
if(isSomeCondition = true) Code:
if(somePtr = NULL) { ... }
else {
somePtr->someField = someValue;
}
|
|
#2
|
|||||
|
|||||
|
Re: Collaborations and Alliances
yes, this is what I meant. There will not be a runtime error, but a bug, which is probably harder to track down then the compile error.
|
|
#3
|
||||||
|
||||||
|
Re: Collaborations and Alliances
Quote:
Anyway, coding style is vastly open to many opinions, and you'll find that the "preferred" method changes about as often as the direction of the wind. The reason I quoted this is because the CMU-defined "horrible style" is required by my current employer. "if (isSomeCondition)" is against the coding standard where I work (but I prefer to do it that way in my own software outside of work). I guess my point is that anything anyone tells you about software, take it with a grain of salt. One man's trash is another man's treasure, and that applies to software as well. Last edited by Chris Hibner : 13-05-2010 at 08:01. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Any East Coast Collaborations? | Akash Rastogi | Team Organization | 47 | 25-06-2008 19:22 |
| Collaborations | hayakuneko | General Forum | 46 | 29-03-2006 11:37 |
| How to start collaborations with teams? | Billfred | General Forum | 3 | 22-10-2005 21:24 |
| College/High School Collaborations? | Charlie B | General Forum | 6 | 06-10-2003 12:05 |