Printing source code.

ashrobo

Well-known member
Joined
Apr 6, 2003
Messages
70
Location
Black Hole
i wonder if anyone (except those from my school) bothers to break up a line of code should it be longer than the width of the page, i.e. taking up two lines for a line of continuous code. ive just printed out a piece of code and saw that VS uses a arrow to indicate continuous text. is it more readable with that or breaking up the codes with _ ?

-ashrobo
 
Its always good to continue long lines of code down to the next line so its easy to read while you code.
 
sometimes, its easy to read the code while coding, but when printing on paper, it wouldnt be that easy to read (when the line of code exceeds a line on the paper).
 
There arent too many cases where long lines of code are warranted. In fact, they usually indicate poorly written code, that lacks checks of return values or encapsulates multiple calls in catch-all error handlers. In most cases dont worry about breaking up the line-- worry about breaking up the logic.
 
Code:
Private Sub grdOrders_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles grdOrders.MouseUp
for instance is longer than the width of an A4 page.
In most cases dont worry about breaking up the line-- worry about breaking up the logic.
hmm, i guess you are right Derek.

cheers! ;)
 
Back
Top