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'.
13 '=============================================================================================
14 'Name:Manish Kumar Sinha
15 'Email Address: manishkumarsinha@sify.com
16 'Test Case Name: Argument passing by Optional Keyword:
17 'O.P-1.0.2: An Optional parameter must specify a constant expression to be used a replacement
18 ' value if no argument is specified. After Optional parameter we can't use general
19 ' parameter as ByVal or ByRef
20 '=============================================================================================
24 Function F(ByVal telephoneNo
as Long, Optional ByVal code
as Integer = 080,Optional ByVal code1
As Integer = 091, ByRef name
As String) As Boolean
25 if (code
<> 080 and code1
<> 091 and name
="")
33 Dim telephoneNo
As Long = 9886066432
34 Dim name
As String ="Manish"
36 status
=F(telephoneNo
,,,name
)
38 Throw
New System
.Exception("#A1, Unexcepted behaviour in string of OP1_0_2")