Hello There, Guest! Login or Register


Clean up;
#4
(09-16-2008, 03:02 AM)Badeend link Wrote: Also a space between if and ( and spaces around 'expression' will be cleaner imo.
For me it all depends on what the condition looks like. For example:
Code:
if (number >= 6)
{
    // Stuff
}
Which looks perfectly clean. On the other hand, I prefer to write something like...
Code:
if (number >= aNumbers[index])
{
...as:
Code:
if ( number >= aNumbers[ index ] )
{
But I guess there is no right or wrong here, it all depends on the programmer's personal taste. ;)
Reply


Messages In This Thread
Clean up; - by tomozj - 09-14-2008, 12:29 PM
Re: Clean up; - by Badeend - 09-16-2008, 03:02 AM
Re: Clean up; - by dab - 09-16-2008, 05:28 AM
Re: Clean up; - by Pugwipe - 09-16-2008, 10:21 AM
Re: Clean up; - by tomozj - 09-16-2008, 04:19 PM