Question on passing an array to and from a function 
Author Message
 Question on passing an array to and from a function

I have hardly used functions and I have a question.  I would like to
pass a multidimensional array to a function and have the function sort
the array and then return it. I am not sure how to pass the function
the array or get the function to return the array when it is done. Any
help would be appreciated.


Thu, 14 Mar 2002 03:00:00 GMT  
 Question on passing an array to and from a function


Quote:
> I have hardly used functions and I have a question.  I would like to
> pass a multidimensional array to a function and have the function sort
> the array and then return it. I am not sure how to pass the function
> the array or get the function to return the array when it is done. Any
> help would be appreciated.

Pass the array ByRef, that way the procedure you call gets to work with
the original. The opposite is ByVal, in that case the called procedure
gets a copy of the array and the original is untouched.
--
Roger Abbott, RHA (Minisystems) Ltd
http://www.rhaminisys.com
DDE FAQ and tools, DDE Client component for Visual Basic
Program launcher/setup menu, freeware, shareware

Sent via Deja.com http://www.deja.com/
Before you buy.



Thu, 14 Mar 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. question on passing and returning arrays from functions

2. Question on passing array parameters to VB.NET Sub/Function

3. Question: Passing arrays to functions

4. Newbie question: Passing type arrays to functions.

5. How to Pass Array to a Function?

6. pass an array as function/sub argument

7. Passing an array to API function

8. Passing of arrays to a function???

9. Passing arrays to a function

10. Passing arrays to functions

11. Passing Arrays to a Function in ASP (VBScript)

12. pass an array back from function

 

 
Powered by phpBB® Forum Software