aspose file tools*
The moose likes Cattle Drive and the fly likes Spacing issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Spacing issue" Watch "Spacing issue" New topic
Author

Spacing issue

Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
I am very confused on spacing issues. My code is below.

The nitpick was to inlude blank lines between declaring value and the following if statement. I was also told to include blank lines between return value and the following brace. In a previous program I was told not to include blank lines between initializing variable and an if statement and I cannot see a reason for including them after the return value. Would someone please explain when to use blank lines. I have read the style guide and it didn't address this. Thanks.
Matthew Phillips

Matthew Phillips
bill bozeman
Ranch Hand

Joined: Jun 30, 2000
Posts: 1070
I can't speak for the nitpicker here, but I think that is a suggestion as opposed to a matter of something required. I don't beleive blank lines is mentioned in the style guide except to use them between methods and to space out large chuncks in methods.
However, it does make it more readable to have identifiers and if statements separated by a blank line. But I think that is a matter of preference.
Correct me if I am wrong.
Bill
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9047
    
  10
spacing or blank lines?

"Spacing" refers to spaces on both sides of an identifier, (horizontally) on the same line, not between lines (vertically).

Bill's statements regarding blank lines are correct.

JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
I must have misunderstood your comments. When I saw that you added blank lines and wrote spacing I thought you meant for me to add blank lines. Disregard my submission. I will resubmit Leap today.
Matthew Phillips
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9047
    
  10
We nitpickers try to surround our comments with blank lines to make them more noticeable.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spacing issue