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

Home » Public Forums » archive » Re: CALL_EXTERNAL + structures + arrays
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: CALL_EXTERNAL + structures + arrays [message #21786] Thu, 21 September 2000 00:00
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
Matthew Newcomb wrote:
>
> G'day,
>
> I'm writing some C code to read compressed data files. The function
> takes a structure argument which has one of the fields as an array. I
> want to be able to dynamically resize this array. The structure looks
> like:
>
> devInfo={devInfoStr, epoch:0L, creationTime:0L, numlines:0L,
> linesPerType:LONARR(256), bytesPerType:LONARR(256), lenScanList:0L,
> devName:'' , scanlist:????? }
>
> The field I'm talking about is the 'scanlist' field. The scanlist can
> be size 1 to UINTMAX. How can I may it an array of bytes?
>
> Thanks for any suggestions.
>
> Matt

It might be time to bite the bullet and get into LINKIMAGE or DLMs.
Then you could create your devInfoStr structure in your C code, and
scanlist could be an array of any size, of any type.

Or, to be more sneaky, you could create the structure in IDL, pass
it into your C code where you could change the dimensions of the
structure
and allocate a new area of memory for it. Of course, this may create
core
leaks or seg. faults if you are not very careful.

--
-----------------------------------------------------------
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523568, Fax : +44 (0)116 2523555
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Reading from process pipes in IDL?
Next Topic: Re: Beginner going INSANE

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

Current Time: Thu Oct 09 22:15:27 PDT 2025

Total time taken to generate the page: 0.95381 seconds