Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Style Guide Question

 
Mike Cunningham
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been looking over the Style Guide section 2.2 - Spacing. I cannot locate the problem with spacing in my reviewed code below. Please help. Thanks.
________________________________________________________
String theName = ( args[0] + " " );
int printsPerLine = 79 / ( theName.length() );
int totalFullLines = 100 / printsPerLine;
spacing around all identifiers.
int lastLinePrints = 100 % printsPerLine;
spacing here also.
 
Amber Woods
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Mike,
I still get that response every so often.
spacing around all identifiers means before and After the identifiers.
For example: x = y + z ;
Amber
[This message has been edited by Amber Woods (edited May 15, 2001).]
 
Joel Cochran
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only hint I can give is that you only have a "quasi" (partial...think half...) problem, and it the same on each statement line.

------------------
I'm a soldier in the NetScape Wars...
Joel
 
Mike Cunningham
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay, I see it now. That will be a hard one to adjust to.
Thanks for the hints!
- Mike
 
Johannes de Jong
tumbleweed
Bartender
Posts: 5089
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dont worry Mike you will get used to it
Good luck
 
Peter Gragert
Ranch Hand
Posts: 424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
int totalFullLines = 100 / printsPerLine;
int totalFullLines = 100 / printsPerLine"here a space too! ;-) ";
Try to find an editor or IDE which does this kind of stuff
automatically!
Until now I have a 95% solution of this kind of problem by
using the IDE of Together ( University licence ) where I can
manage the style of beautifying.

[This message has been edited by Peter Gragert (edited May 17, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic