tags:

views:

37

answers:

2

Is there ways to create optional arguments to functions in vb script allowing you to write functions something like...

myFunc("happy")
myFunc("happy", 1, 2, 3)
myFunc("happy", 1)
etc.
+1  A: 

How about overloading?

Josh Stodola
Again sort of. You still end up having to use an array or a null check on parameters. Guess that's the best vb script offers. Thanks for the help.
Rob Segal
+4  A: 

The optional keyword (like in VB6) is not allowed in vbscript

maybe this helps: http://www.4guysfromrolla.com/webtech/071801-1.shtml

danimajo
Sort of. Ideally I was hoping to avoid using an array or null arguments supplied to the function. Guess it isn't possible with VB script. Thanks for the help.
Rob Segal