I've had a good look around and no-one seems to have mentioned this, which leads me to believe that I may be missing something simple.
Basically, is there a way I can do the following, and if so, how?:
At the moment, VS2005 is throwing an error which is not allowing me to add the optional array2 to the parameters.
Of course, there are other ways I can do this, but it's bugging me now - are optional arrays not allowed?
(For an example of where the above could be used: comparing a specific value to a list of words then, if not found, comparing it to a list of common mistakes)
Basically, is there a way I can do the following, and if so, how?:
Code:
Sub ResolveArrays(ByVal array1() As String, ByVal valueX As String, _ Optional ByVal array2() As String = {""}, Optional ByVal retry As Boolean = False) [I]' Code to take array1 and compare each value to valueX, [/I] [I] ' if no value is found, either exit or[/I] [I] ' (optionally) compare the second array to valueX if the retry flag is set[/I] Exit Sub
Of course, there are other ways I can do this, but it's bugging me now - are optional arrays not allowed?
(For an example of where the above could be used: comparing a specific value to a list of words then, if not found, comparing it to a list of common mistakes)
Comment