
Passing arrays to SUBs and FUNCTIONs
Quote:
>Could someone post a summary of the syntax for passing arrays to SUBs
>and FUNCTIONs and which arrays can be passed (someone posted earlier
>saying that he thought that control arrays couldn't be passed)? I've
looked >in the manuals, the on-line help, the FAQ and the KB that comes
with VB PE, >but to no avail.
You cannot pass control arrays to a sub. However, you can pass a control
array element, i.e., Sub_Name controlname(1)
To pass normal arrays to subs or functions, just pass the array name
followed by (), i.e.,
.... calling procedure
Name_of_Sub ArrayName()
.........
Sub Name_of_Sub ArrayName () as ???????????
?????? is the type of the array such as integer, string, userdefined, etc.
Note that one of the replies you recieved to your query suggested that
you had to use the Call keyword to call a sub where an array is passed.
This is incorrect. You need not use the key word.
_____________________________________________________
"Keep an Open Mind and People will throw in Garbage"