HELP: Arrays as procedure arguments 
Author Message
 HELP: Arrays as procedure arguments

Hello,

How do you define a procedure which accepts an array of any dimension?

E.g.

I have the following

function GetListItems
   dim aTmpList()

   <code here to populate aList>
        ...
   GetListItems = aTmpList
end function

sub DisplayListItems(aList)
   <code here to go through array and print stuff out>
end sub

with something like this I get a type mismatch error.
I've looked through the VBScript Documentation but it
never addresses passing arrays as in/out arguments.

Thank you,

Mark



Tue, 27 Feb 2001 03:00:00 GMT  
 HELP: Arrays as procedure arguments
Quote:
> Hello,

> How do you define a procedure which accepts an array of any dimension?

...

Sorry, but this wasn't what was causing the problem.  I have the
procedure defined properly and the array is passed.  The problem occurs
when I try to do the following

dim aList()

sub InitList(aData)
        aList = aData
end sub

What I would like to do is have this procedure take an array of any
dimension and simply assign aList to "equal" it (i.e. take on its
dimensions and data).  Apparently this cannot be done? (or at least this
easily).  

Does anyone have any recommendations on how I can achieve this?

Thank you,

Mark



Tue, 27 Feb 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Need help calling procedure with array as argument

2. Control array arguments in procedures

3. Control array arguments in procedures

4. Control array arguments in procedures

5. Array argument to SUB-Procedure

6. Array as an argument - Please help

7. HELP!! passing an array as an argument

8. Help needed passing arrays as arguments

9. Invalid procedure call or argument - what does this mean

10. Invalid procedure call or argument: 'mid'

11. Passing String Argument to Procedure

12. Function Error: Invalid procedure call or argument

 

 
Powered by phpBB® Forum Software