<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener("load", function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <iframe src="http://www.blogger.com/navbar.g?targetBlogID=12994943&amp;blogName=Josiah+International&amp;publishMode=PUBLISH_MODE_BLOGSPOT&amp;navbarType=SILVER&amp;layoutType=CLASSIC&amp;searchRoot=http%3A%2F%2Fjosiahinternational.blogspot.com%2Fsearch&amp;blogLocale=en_US&amp;homepageUrl=http%3A%2F%2Fjosiahinternational.blogspot.com%2F" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" height="30px" width="100%" id="navbar-iframe" allowtransparency="true" title="Blogger Navigation and Search"></iframe> <div></div>

Tuesday, June 07, 2005

Line continuation characters? To use or not to use... that is the question

In my book for the Visual Basic class I'm in right now it tells me that I need to use a line continuation character (_) in the middle of each line... to keep my lines of code shorter.

So, for instance(and this won't work TOO well... since this will line wrap... but...)

Private Sub txtCartons_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCartons.TextChanged

Becomes:

Private Sub txtCartons_TextChanged(ByVal sender As _
System.Object, ByVal e As System.EventArgs) _
Handles txtCartons.TextChanged


If you were looking at this in Visual Studio .NET 2003 the first line would run right along in its merry way.. off the right hand side of the screen.
The book argues that you should put the under-score(s) in there to increase readability... I can understand that with some really long handwritten code, but when it comes to some dinky lil event handler code, I don't even need to review/edit it anyways...
My main argument against doing this: I'm too lazy.
Going back through all my code and adding the underscore(s) in the right places is kind of a pain.

Well, gotta run... we're powering down the network, lightning storm here. I'll be back later.

2 Comments:

At 7:30 PM, Anonymous Shambleyqueen said...

"Too lazy?!"

*scribbles furiously on clipboard*
Heh

 
At 10:36 AM, Anonymous Zak said...

That's Gay!

 

Post a Comment

<< Home