Re: How to pass a 2-D array into a function?
- From: "Michael C" <mculley@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 15 Nov 2005 14:26:08 +1100
"Dmitriy Antonov" <antonovdima@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> It has its scope. It is convenient, for example, when "amorphous"
> interface is desired. Consider this general-purpose method, which allows
> you to print (for testing purposes) content of any one-dimensional array
> (only primitive data types).
>
> public sub TestArray(vArray as variant)
> if not isarray(vArray) then exit sub
> dim v as variant
> for each v from vArray
> debug.print v
> next v
> end sub
>
> There are many other possible benefits of using variants as arguments and,
> when used consciously, they allow to create very powerful solutions.
I can see it's use but somehow I don't like that code at all. When I've done
stuff like this I've created a function for each array type, which is
generally only long, double and string.
Michael
.
- References:
- Re: How to pass a 2-D array into a function?
- From: Gman
- Re: How to pass a 2-D array into a function?
- From: Michael C
- Re: How to pass a 2-D array into a function?
- From: Dmitriy Antonov
- Re: How to pass a 2-D array into a function?
- Prev by Date: Re: How to pass a 2-D array into a function?
- Next by Date: Re: How to pass a 2-D array into a function?
- Previous by thread: Re: How to pass a 2-D array into a function?
- Next by thread: Re: How to pass a 2-D array into a function?
- Index(es):
Relevant Pages
|
Loading