2 REM ExpectedError: BC30202
3 REM ErrorMessage: 'Optional' expected.
6 REM ExpectedError: BC30815
7 REM ErrorMessage: 'name' is not declared. File I/O functionality is available in the 'Microsoft.VisualBasic' namespace.
10 REM ExpectedError: BC30057
11 REM ErrorMessage: Too many arguments to 'Public Function F(telephoneNo As Long, [code As Integer = 80], [code1 As Integer = 91]) As Boolean'.
14 REM ExpectedError: BC30202
15 REM ErrorMessage: 'Optional' expected.
18 REM ExpectedError: BC30815
19 REM ErrorMessage: 'name' is not declared. File I/O functionality is available in the 'Microsoft.VisualBasic' namespace.
22 REM ExpectedError: BC30057
23 REM ErrorMessage: Too many arguments to 'Public Function F(telephoneNo As Long, [code As Integer = 80], [code1 As Integer = 91]) As Boolean'.
26 REM ExpectedError: BC30202
27 REM ErrorMessage: 'Optional' expected.
30 REM ExpectedError: BC30815
31 REM ErrorMessage: 'name' is not declared. File I/O functionality is available in the 'Microsoft.VisualBasic' namespace.
34 REM ExpectedError: BC30057
35 REM ErrorMessage: Too many arguments to 'Public Function F(telephoneNo As Long, [code As Integer = 80], [code1 As Integer = 91]) As Boolean'.
37 '=============================================================================================
38 'Name:Manish Kumar Sinha
39 'Email Address: manishkumarsinha@sify.com
40 'Test Case Name: Argument passing by Optional Keyword:
41 'O.P-1.0.2: An Optional parameter must specify a constant expression to be used a replacement
42 ' value if no argument is specified. After Optional parameter we can't use general
43 ' parameter as ByVal or ByRef
44 '=============================================================================================
48 Function F(ByVal telephoneNo
as Long, Optional ByVal code
as Integer = 080,Optional ByVal code1
As Integer = 091, ByRef name
As String) As Boolean
49 if (code
<> 080 and code1
<> 091 and name
="")
57 Dim telephoneNo
As Long = 9886066432
58 Dim name
As String ="Manish"
60 status
=F(telephoneNo
,,,name
)
62 Throw
New System
.Exception("#A1, Unexcepted behaviour in string of OP1_0_2")