comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Multidimensional arrays and CALL_EXTERNAL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Multidimensional arrays and CALL_EXTERNAL [message #60830 is a reply to message #60829] Fri, 20 June 2008 11:24 Go to previous messageGo to previous message
Foldy Lajos is currently offline  Foldy Lajos
Messages: 268
Registered: October 2001
Senior Member
On Fri, 20 Jun 2008, Dan wrote:

> Hi everyone,
>
> Now that I have gotten CALL_EXTERNAL to work correctly, I am trying to
> figure out how IDL stores multidimensional arrays in memory. Since
> CALL_EXTERNAL passes an arrays by reference (pointer to the first
> element of the array), the multidimensional arrays in C act like a 1-D
> array. I have figured out how to access elements of a 2D array
> (array(i, j) ---> array[i + i_size * j]), but haven't been able to
> figure out how to access elements from a 4D array.
>
> For example, how would I access element:
> array(i, j, k, m) from the pointer in C?
>

I have never used CALL_EXTERNAL, but my guess is:

array(i, j, k, m) ---> array[i
+ i_size * j
+ i_size * j_size * k
+ i_size * j_size * k_size * m]

regards,
lajos
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Runtime crashes
Next Topic: Java Bridge Import

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 06:45:27 PDT 2025

Total time taken to generate the page: 1.84375 seconds