What is the use of optional key word in VBScript?

Questions by christia   answers by christia

Showing Answers 1 - 1 of 1 Answers

Vb Script functions cannot use the Optional keyword because it Vb Script we need to declare every argument that we want to use.
In Visual Basic the Optional keyword, which allows some arguments to be left out,which is not implemented in Vb Script.Hence we can pass null value to the function in Vb script.

Example:

Function SomeArgs(one, two, three, four)
SomeArgs = one & two & three & four
End Function

Call SomeArgs(1, 2, 3, Null)

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions