> > > one thing I didn't like was : > > > if (-1 != new_value) > > > or something like that.. I hate when people do that.. I think it's more > > > intuitive, easy to read to just use > > > if (new_value != -1) > > > > Actually it also isn't my custom to do it the 'if (-1 != new_value)' -way. > > It is more like having copied the style from existing code in the file.
I didn't used to like it either, however at my current job the coding style was set that we should do it that way. Now I understand why it is set like that, often you could type: if(new_value = -1) and forget the == (or just a typo) that will compile. However if you do it the other way and forget: if(-1 = new_value), that will actually fail at build time rather than causing a bug. Lio. ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Amsn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/amsn-devel
