When looking through the style guide, I noticed that there isn't a convention (that I could find) for where you put the semicolon at the end of a statement. Some statements in the style guide have a space then the semicolon, other statements have the the semicolon immediately following the statement without the space.
So, is there a specific convention we should follow? And should it be included in the style guide?
Personally I have started to leave a space before the semi-colon, ( I find it easier to see if I have missed it out !! ), in my opinion it looks better and is easier to read ( but that's my opinion ).
Thus if you have something like int i = 2 + sum ; you need a space after sum.
On the other hand, if you have something like int i = sum + 2; since '2' is not an identifier, it is your choice whether to put a space after it or not.
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
To avoid criticism do nothing, say nothing, be nothing. -Elbert Hubbard. Please critique this tiny ad:
Gift giving made easy with the permaculture playing cards