diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-20 03:56:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-20 03:56:56 +0000 |
commit | 75a9fa68f6cdd6769813a8c5e055bfb00a08c089 (patch) | |
tree | daf1676b4e5ea491b7a370467a24b8181cc21827 /runtime/indent/testdir/vb.in | |
parent | Adding upstream version 2:9.1.0377. (diff) | |
download | vim-75a9fa68f6cdd6769813a8c5e055bfb00a08c089.tar.xz vim-75a9fa68f6cdd6769813a8c5e055bfb00a08c089.zip |
Adding upstream version 2:9.1.0496.upstream/2%9.1.0496
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/indent/testdir/vb.in')
-rw-r--r-- | runtime/indent/testdir/vb.in | 52 |
1 files changed, 47 insertions, 5 deletions
diff --git a/runtime/indent/testdir/vb.in b/runtime/indent/testdir/vb.in index 1653ae6..cb964f7 100644 --- a/runtime/indent/testdir/vb.in +++ b/runtime/indent/testdir/vb.in @@ -1,6 +1,16 @@ ' vim: filetype=vb shiftwidth=4 expandtab ' ' START_INDENT +#Const Debug = False + +#If Win64 Then +' Win64=true, Win32=true, Win16=false +#ElseIf Win32 Then +' Win32=true, Win16=false +#Else +' Win16=true +#End If + Public Type GEmployeeRecord ' Create user-defined type. ID As Integer ' Define elements of data type. Name As String * 20 @@ -95,6 +105,9 @@ Public Sub TestMultiline (cellAddr As String, rowNbr As Long) Dim rng As Range Set rng = Range(cellAddr) + +' Line continuation is implemented as a two-character sequence- +' whitespace followed by underscore. With rng .Cells(1,1).Value = _ "Line 1 of multiline string; " & _ @@ -102,14 +115,25 @@ With rng "Line 3 of multiline string" End With -' The following lines have whitespace after the underscore character -' and therefore do not form a valid multiline statement. The indent -' script correctly treats them as four single line statements contrary -' to the author's obvious indent. -rng..Cells(1,1).Value = _ +' This code block omits the leading whitespace character and so +' the trailing underscore will not be treated as line continuation. +With rng +.Cells(1,1).Value =_ +"Line 1 of multiline string; " &_ +"Line 2 of multiline string; " &_ +"Line 3 of multiline string" +End With + +' The following lines have whitespace after the underscore character. +' This is contrary to Microsoft documentation but it is reported that +' some Microsoft editors allow it and will still treat the statement +' as line-continued. +With rng +rng.Cells(1,1).Value = _ "Line 1 of multiline string; " & _ "Line 2 of multiline string; " & _ "Line 3 of multiline string" +End With End Sub @@ -121,6 +145,18 @@ stmtLabel: End Sub +Public Static Function TestStatic(addend As Integer) +Dim Integer accumulator +accumulator = accumulator + addend +TestStatic = accumulator +End Function + +Friend Function TestFriend(addend As Integer) +Static Integer accumulator +accumulator = accumulator + addend +TestFriend = accumulator +End Function + Sub TestTypeKeyword() Type EmployeeRecord ' Create user-defined type. ID As Integer ' Define elements of data type. @@ -131,4 +167,10 @@ HireDate As Date End Type Dim varType As EmployeeRecord End Sub + +Sub TestDateLiteralAfterLineContinuation +Dim birthday as Date +birthday = _ +#January 1, 1901# +End Sub ' END_INDENT |