From 7f2d7928fbb7d49188a8fee8cd2aea6cafff23cd Mon Sep 17 00:00:00 2001 From: Paul M Cohen Date: Thu, 5 Sep 2019 19:56:33 -0700 Subject: [PATCH 01/10] Add support for Comments after Line Continuations new in VB 16. --- .../visual-basic/getting-started/whats-new.md | 22 +++++++++++++++++-- ...to-break-and-combine-statements-in-code.md | 2 +- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/docs/visual-basic/getting-started/whats-new.md b/docs/visual-basic/getting-started/whats-new.md index d8a2c5b608191..5fa04f8d8c8ba 100644 --- a/docs/visual-basic/getting-started/whats-new.md +++ b/docs/visual-basic/getting-started/whats-new.md @@ -15,11 +15,14 @@ This topic lists key feature names for each version of Visual Basic, with detail ## Current version -Visual Basic 15.8 / Visual Studio 2017 Version 15.8 -For new features, see [Visual Basic 15.8](#visual-basic-158) +Visual Basic 16 / Visual Studio 2019 Version 16.0 +For new features, see [Visual Basic 16](#visual-basic-16) ## Previous versions +Visual Basic 15.8 / Visual Studio 2017 Version 15.8 +For new features, see [Visual Basic 15.8](#visual-basic-158) + Visual Basic 15.5 / Visual Studio 2017 Version 15.5 For new features, see [Visual Basic 15.5](#visual-basic-155) @@ -53,6 +56,21 @@ Bit-shift operators, loop variable declaration Visual Basic / Visual Studio .NET 2002 The first release of Visual Basic .NET +## Visual Basic 16 + +In Visual Basic 15. and Earlier comment are only allowed on blank lines before a statement, at the end of a statement or in specific places within a statement where an implicit line continuation is allowed. + +Starting is Visual Basic 16 comments are also allowed after Explicit Line Continuation and within a statement on a line beginning with a space followed by an underscore. +```VB +Public Sub Main() + cmd.CommandText = ' Comment is allowed here without _ + "SELECT * FROM Titles JOIN Publishers " _ ' This is a comment + & "ON Publishers.PubId = Titles.PubID " _ + _ ' This is a comment on a line without code + & "WHERE Publishers.State = 'CA'" +End Sub +``` + ## Visual Basic 15.8 **Optimized floating-point to integer conversion** diff --git a/docs/visual-basic/programming-guide/program-structure/how-to-break-and-combine-statements-in-code.md b/docs/visual-basic/programming-guide/program-structure/how-to-break-and-combine-statements-in-code.md index 05970a19b60f2..2ee2599c5c351 100644 --- a/docs/visual-basic/programming-guide/program-structure/how-to-break-and-combine-statements-in-code.md +++ b/docs/visual-basic/programming-guide/program-structure/how-to-break-and-combine-statements-in-code.md @@ -27,7 +27,7 @@ When writing your code, you might at times create lengthy statements that necess ### To break a single statement into multiple lines -- Use the line-continuation character, which is an underscore (`_`), at the point at which you want the line to break. The underscore must be immediately preceded by a space and immediately followed by a line terminator (carriage return). +- Use the line-continuation character, which is an underscore (`_`), at the point at which you want the line to break. The underscore must be immediately preceded by a space and immediately followed by a line terminator (carriage return) or starting with language version 16 a comment is allowed after a line continuation.. > [!NOTE] > In some cases, if you omit the line-continuation character, the Visual Basic compiler will implicitly continue the statement on the next line of code. For a list of syntax elements for which you can omit the line-continuation character, see "Implicit Line Continuation" in [Statements](../../../visual-basic/programming-guide/language-features/statements.md). From 7fefa2d0b88356d792e690d103f3ebefaca9597b Mon Sep 17 00:00:00 2001 From: Paul M Cohen Date: Fri, 6 Sep 2019 17:12:47 -0700 Subject: [PATCH 02/10] Update docs/visual-basic/getting-started/whats-new.md Co-Authored-By: Ron Petrusha --- docs/visual-basic/getting-started/whats-new.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/visual-basic/getting-started/whats-new.md b/docs/visual-basic/getting-started/whats-new.md index 5fa04f8d8c8ba..74bd073c5bb55 100644 --- a/docs/visual-basic/getting-started/whats-new.md +++ b/docs/visual-basic/getting-started/whats-new.md @@ -15,7 +15,7 @@ This topic lists key feature names for each version of Visual Basic, with detail ## Current version -Visual Basic 16 / Visual Studio 2019 Version 16.0 +Visual Basic 16.0 / Visual Studio 2019 Version 16.0 For new features, see [Visual Basic 16](#visual-basic-16) ## Previous versions From 2b3e1499807c9e971a87f9170ac8e46931903e0c Mon Sep 17 00:00:00 2001 From: Paul M Cohen Date: Fri, 6 Sep 2019 17:13:05 -0700 Subject: [PATCH 03/10] Update docs/visual-basic/getting-started/whats-new.md Co-Authored-By: Ron Petrusha --- docs/visual-basic/getting-started/whats-new.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/visual-basic/getting-started/whats-new.md b/docs/visual-basic/getting-started/whats-new.md index 74bd073c5bb55..b6e40a850541f 100644 --- a/docs/visual-basic/getting-started/whats-new.md +++ b/docs/visual-basic/getting-started/whats-new.md @@ -16,7 +16,7 @@ This topic lists key feature names for each version of Visual Basic, with detail ## Current version Visual Basic 16.0 / Visual Studio 2019 Version 16.0 -For new features, see [Visual Basic 16](#visual-basic-16) +For new features, see [Visual Basic 16.0](#visual-basic-160) ## Previous versions From 81eaacb86e9a8baec8e9e02b79506792bf8ca15a Mon Sep 17 00:00:00 2001 From: Paul M Cohen Date: Fri, 6 Sep 2019 17:13:20 -0700 Subject: [PATCH 04/10] Update docs/visual-basic/getting-started/whats-new.md Co-Authored-By: Ron Petrusha --- docs/visual-basic/getting-started/whats-new.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/visual-basic/getting-started/whats-new.md b/docs/visual-basic/getting-started/whats-new.md index b6e40a850541f..332090b298a16 100644 --- a/docs/visual-basic/getting-started/whats-new.md +++ b/docs/visual-basic/getting-started/whats-new.md @@ -56,7 +56,7 @@ Bit-shift operators, loop variable declaration Visual Basic / Visual Studio .NET 2002 The first release of Visual Basic .NET -## Visual Basic 16 +## Visual Basic 16.0 In Visual Basic 15. and Earlier comment are only allowed on blank lines before a statement, at the end of a statement or in specific places within a statement where an implicit line continuation is allowed. From 03af87730f94ac9d6159f20baca1e44952ec8e21 Mon Sep 17 00:00:00 2001 From: Paul M Cohen Date: Fri, 6 Sep 2019 17:13:49 -0700 Subject: [PATCH 05/10] Update docs/visual-basic/getting-started/whats-new.md Co-Authored-By: Ron Petrusha --- docs/visual-basic/getting-started/whats-new.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/visual-basic/getting-started/whats-new.md b/docs/visual-basic/getting-started/whats-new.md index 332090b298a16..7966d237a31fc 100644 --- a/docs/visual-basic/getting-started/whats-new.md +++ b/docs/visual-basic/getting-started/whats-new.md @@ -58,7 +58,7 @@ The first release of Visual Basic .NET ## Visual Basic 16.0 -In Visual Basic 15. and Earlier comment are only allowed on blank lines before a statement, at the end of a statement or in specific places within a statement where an implicit line continuation is allowed. +In Visual Basic 15.8 and earlier versions, comments are only allowed on blank lines, at the end of a statement, or in specific places within a statement where an implicit line continuation is allowed. Starting is Visual Basic 16 comments are also allowed after Explicit Line Continuation and within a statement on a line beginning with a space followed by an underscore. ```VB From a2b0431f61c5c0660cda390ec4ea95842ef41b03 Mon Sep 17 00:00:00 2001 From: Paul M Cohen Date: Fri, 6 Sep 2019 17:19:26 -0700 Subject: [PATCH 06/10] Update docs/visual-basic/getting-started/whats-new.md Co-Authored-By: Ron Petrusha --- docs/visual-basic/getting-started/whats-new.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/visual-basic/getting-started/whats-new.md b/docs/visual-basic/getting-started/whats-new.md index 7966d237a31fc..6327f5899fcf4 100644 --- a/docs/visual-basic/getting-started/whats-new.md +++ b/docs/visual-basic/getting-started/whats-new.md @@ -60,7 +60,7 @@ The first release of Visual Basic .NET In Visual Basic 15.8 and earlier versions, comments are only allowed on blank lines, at the end of a statement, or in specific places within a statement where an implicit line continuation is allowed. -Starting is Visual Basic 16 comments are also allowed after Explicit Line Continuation and within a statement on a line beginning with a space followed by an underscore. +Starting with Visual Basic 16.0, comments are also allowed after explicit line continuations and within a statement on a line beginning with a space followed by an underscore. ```VB Public Sub Main() cmd.CommandText = ' Comment is allowed here without _ From aa4de189d5851106aa8c344875a38996983f2305 Mon Sep 17 00:00:00 2001 From: Paul M Cohen Date: Fri, 6 Sep 2019 17:21:23 -0700 Subject: [PATCH 07/10] Update docs/visual-basic/getting-started/whats-new.md Co-Authored-By: Ron Petrusha --- docs/visual-basic/getting-started/whats-new.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/visual-basic/getting-started/whats-new.md b/docs/visual-basic/getting-started/whats-new.md index 6327f5899fcf4..016501885c5e1 100644 --- a/docs/visual-basic/getting-started/whats-new.md +++ b/docs/visual-basic/getting-started/whats-new.md @@ -61,7 +61,8 @@ The first release of Visual Basic .NET In Visual Basic 15.8 and earlier versions, comments are only allowed on blank lines, at the end of a statement, or in specific places within a statement where an implicit line continuation is allowed. Starting with Visual Basic 16.0, comments are also allowed after explicit line continuations and within a statement on a line beginning with a space followed by an underscore. -```VB + +```vb Public Sub Main() cmd.CommandText = ' Comment is allowed here without _ "SELECT * FROM Titles JOIN Publishers " _ ' This is a comment From 7e1c6401b33c69fd919d5a3acd380ad864d4c44a Mon Sep 17 00:00:00 2001 From: Paul M Cohen Date: Fri, 6 Sep 2019 17:21:56 -0700 Subject: [PATCH 08/10] Update docs/visual-basic/programming-guide/program-structure/how-to-break-and-combine-statements-in-code.md Co-Authored-By: Ron Petrusha --- .../how-to-break-and-combine-statements-in-code.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/visual-basic/programming-guide/program-structure/how-to-break-and-combine-statements-in-code.md b/docs/visual-basic/programming-guide/program-structure/how-to-break-and-combine-statements-in-code.md index 2ee2599c5c351..b20dc40a30423 100644 --- a/docs/visual-basic/programming-guide/program-structure/how-to-break-and-combine-statements-in-code.md +++ b/docs/visual-basic/programming-guide/program-structure/how-to-break-and-combine-statements-in-code.md @@ -27,7 +27,7 @@ When writing your code, you might at times create lengthy statements that necess ### To break a single statement into multiple lines -- Use the line-continuation character, which is an underscore (`_`), at the point at which you want the line to break. The underscore must be immediately preceded by a space and immediately followed by a line terminator (carriage return) or starting with language version 16 a comment is allowed after a line continuation.. +- Use the line-continuation character, which is an underscore (`_`), at the point at which you want the line to break. The underscore must be immediately preceded by a space and immediately followed by a line terminator (carriage return) or (starting with version 16.0) a comment followed by a carriage return. > [!NOTE] > In some cases, if you omit the line-continuation character, the Visual Basic compiler will implicitly continue the statement on the next line of code. For a list of syntax elements for which you can omit the line-continuation character, see "Implicit Line Continuation" in [Statements](../../../visual-basic/programming-guide/language-features/statements.md). From 006b0d363d6619391f6bce7bb40eed32965af5f3 Mon Sep 17 00:00:00 2001 From: Paul M Cohen Date: Fri, 6 Sep 2019 17:29:14 -0700 Subject: [PATCH 09/10] Update whats-new.md --- docs/visual-basic/getting-started/whats-new.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/visual-basic/getting-started/whats-new.md b/docs/visual-basic/getting-started/whats-new.md index 016501885c5e1..1142b0d302f78 100644 --- a/docs/visual-basic/getting-started/whats-new.md +++ b/docs/visual-basic/getting-started/whats-new.md @@ -58,9 +58,7 @@ The first release of Visual Basic .NET ## Visual Basic 16.0 -In Visual Basic 15.8 and earlier versions, comments are only allowed on blank lines, at the end of a statement, or in specific places within a statement where an implicit line continuation is allowed. - -Starting with Visual Basic 16.0, comments are also allowed after explicit line continuations and within a statement on a line beginning with a space followed by an underscore. +In Visual Basic 15.8 and earlier versions, comments are only allowed on blank lines, at the end of a statement, or in specific places within a statement where an implicit line continuation is allowed. Starting with Visual Basic 16.0, comments are also allowed after explicit line continuations and within a statement on a line beginning with a space followed by an underscore. ```vb Public Sub Main() From bcfb2231c4c218f633c6521cca95f8fc3fe29314 Mon Sep 17 00:00:00 2001 From: Paul M Cohen Date: Fri, 6 Sep 2019 17:29:31 -0700 Subject: [PATCH 10/10] Update docs/visual-basic/getting-started/whats-new.md Co-Authored-By: Kathleen Dollard --- docs/visual-basic/getting-started/whats-new.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/visual-basic/getting-started/whats-new.md b/docs/visual-basic/getting-started/whats-new.md index 1142b0d302f78..7995ca505ed8c 100644 --- a/docs/visual-basic/getting-started/whats-new.md +++ b/docs/visual-basic/getting-started/whats-new.md @@ -57,7 +57,9 @@ Visual Basic / Visual Studio .NET 2002 The first release of Visual Basic .NET ## Visual Basic 16.0 +Visual Basic 16.0 focuses on supplying more of the features of the Visual Basic Runtime (microsoft.visualbasic.dll) to .NET Core and is the first version of Visual Basic focused on .NET Core. Many portions of the Visual Basic Runtime depend on WinForms and these will be added in a later version of Visual Basic. +**Comments allowed in more places within statements** In Visual Basic 15.8 and earlier versions, comments are only allowed on blank lines, at the end of a statement, or in specific places within a statement where an implicit line continuation is allowed. Starting with Visual Basic 16.0, comments are also allowed after explicit line continuations and within a statement on a line beginning with a space followed by an underscore. ```vb