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

Home » Public Forums » archive » Re: C Alignment/IDL structures
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: C Alignment/IDL structures [message #43092 is a reply to message #43075] Mon, 21 March 2005 15:03 Go to previous messageGo to previous message
Randall  Skelton is currently offline  Randall Skelton
Messages: 31
Registered: October 2004
Member
> Ok, this probably answers my question. I was hoping I could create
> an array of structs, but this is maybe not so memory efficient so
> I might try to create one structure with multiple arrays.

Good news Joey, you can create an array of structs in C and pass them
back to IDL so you are not trying to do the impossible. I'm not
entirely sure what is going wrong in the code you posted. Are you seg
faulting IDL, getting garbage in the resulting array of structures or
getting an undefined variable returned?

Download the code at :

http://brutus.uwaterloo.ca/~skelton/Code/TestStruct.tar.gz

The code assumes a *nix operating system but modifying it to work with
windows shouldn't be too difficult. The code gives two methods of
creating an array of structures in C and pass them to back to IDL. The
first is quite similar to what you are trying to do (uses
IDL_ImportArray) and the second handles the case where the C structure
doesn't cleanly map to the new IDL structure (slightly more complicated
and requires some pointer arithmetic).

Let me know if it helps.

Cheers,
Randall
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Matrix expansion performance
Next Topic: Re: MISSING_VALUE

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

Current Time: Sat Oct 11 10:11:30 PDT 2025

Total time taken to generate the page: 0.40305 seconds