Re: Does VB have something that can return just a column of a multi-column array?
- From: "George Hester" <hesterloli@xxxxxxxxxxx>
- Date: Sun, 29 Jun 2008 17:27:35 -0400
That sounds neat. A 1-dim array of pointers to the second column of the
multi-dim array A Interesting. Thanks for the tip.
--
George Hester
_________________________________
"Jim Mack" <jmack@xxxxxxxxxxxxxxx> wrote in message
news:eHkwb5f2IHA.5728@xxxxxxxxxxxxxxxxxxxxxxx
George Hester wrote:
I would like to access just one dimension of a multi-column and
rows array. Something like if A(i,j) is an array with values for i
and j how about A(I,j) being just a one-dimensional array? I could
be say the number of elements i. Thanks.
VB doesn't natively allow that, but it's possible to fool VB into
thinking it does, depending on how the array is ordered. But it's a
hack, and has to be approached carefully.
Basically, the idea is to create a blank single-dim array, and
manipulate its SafeArray structure to have the correct bounds, and a
pointer to the data of interest.
It's not for the inexperienced or the careless, though. You can get
things bollixed up pretty well if you miss a step, or do something you
shouldn't.
--
Jim Mack
MicroDexterity Inc
www.microdexterity.com
.
- Follow-Ups:
- Re: Does VB have something that can return just a column of a multi-column array?
- From: senn
- Re: Does VB have something that can return just a column of a multi-column array?
- From: Bill McCarthy
- Re: Does VB have something that can return just a column of a multi-column array?
- From: Jim Mack
- Re: Does VB have something that can return just a column of a multi-column array?
- From: Larry Serflaten
- Re: Does VB have something that can return just a column of a multi-column array?
- References:
- Prev by Date: ShadowClass
- Next by Date: Foundation of Programming EBook for free...
- Previous by thread: Re: Does VB have something that can return just a column of a multi-column array?
- Next by thread: Re: Does VB have something that can return just a column of a multi-column array?
- Index(es):
Relevant Pages
|