-
June 14th, 2010, 10:52 AM
#1
Line Continuation Character in VB
Hello everyone, it is an honour to meet you!
I should congratulate you on an excellent VS 2010 product! 
Just curious here. Why has it taken so long to get rid of VB's Line Continuation character - the "underscore" ?. Also, I have heared that certain with statements, the underscore is still needed, is this true?
-
June 14th, 2010, 12:18 PM
#2
Re: Line Continuation Character in VB
Hi HanneSThEGreaT,
There was a significant amount of work that needed to be done to remove the line continuation character. Before, <CrLf> was the line terminator in VB (just like the semi-colon is the line terminator in C#) but now there is NO line terminator in VB (I believe this is the only language without a line terminator now). This means that there is come significant (and cool ;-)) logic in the VB compiler that looks at the meaning of your code to determine where the terminator should be. Removing the requirement for the underscore comes in especially handy when writing LINQ statements.
Check out this Channel 9 video with Tyler Whitney, a developer on the Visual Basic compiler team: http://channel9.msdn.com/posts/funky...sual-Basic-10/
There are still places where the compiler cannot infer the meaning of your code if you insert a break prematurely (as Tyler explaines) but you get a compiler error immediately (thanks to VB's background compiler) which helps you realize immediately that you either need an underscore or need to put the break elsewhere.
HTH,
-Beth
-
June 15th, 2010, 01:32 AM
#3
Re: Line Continuation Character in VB
Hi Beth,
Thank you for clearing that up 
Hannes
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|