Since you went to the trouble of writing it out here, you could have simply
tried it out. Your code looks fine, except I think () should come after
integer not bar in the 1st example
For the parameters, you could declare it as ParamArray which would let you
pass in 1 value, great replacement for overloading (in some cases)
Function foo (ParamArray bar as integer()
end function
you can now call foo with either a single value, or an array, or a comma
separated list
foo(1)
foo(arr)
foo(1,2,3,4,5)
ParramArray _must_ be the last parameter of a function.
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Blue Streak" <rd********@hotmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Just some basic questions because none of my reference manuals cover
this explicitly:
1) If you want have an argument as an array of integers would this
be the correct declaration?
Function foo(bar() as Integer) as Integer
...
End Function
2) If you wanted to *return* an array of integers from the function
would this declaration be correct?
Function foo(bar as Integer) as Integer()
...
End Function
TIA...