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

Home » Public Forums » archive » Building sharable object libraries for 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: Building sharable object libraries for CALL_EXTERNAL [message #14697 is a reply to message #14591] Mon, 22 March 1999 00:00 Go to previous messageGo to previous message
Dr. G. Scott Lett is currently offline  Dr. G. Scott Lett
Messages: 14
Registered: February 1998
Junior Member
I don't think this is true. Functions like IDL_MakeStruct(),
IDL_ImportArray() and IDL_ImportNamedArray(),
are handy for building IDL variables with memory you allocate.

However, the following code will most likely not produce the desired
results. Reading the External Development Guide is a recommended first
step, especially the chapter on IDL Internals: Variables.

> output=(float **)malloc(4*n);
> for(i=0;i<n;i++) output[i]=(float*)malloc(4*x*y);


Scott


>
> I thought it was a no-no to allocate memory inside of an external
> routine, that is to be passed back to IDL. The Advanced Developer's
> Guide has always stated that all memory must be allocated prior to
> calling the routine. Is that not always the case?
>
> Even if you get this to compile, I would be very wary of the results.
>
> Dave
> --
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
> David S. Foster Univ. of California, San Diego
> Programmer/Analyst Brain Image Analysis Laboratory
> foster@bial1.ucsd.edu Department of Psychiatry
> (619) 622-5892 8950 Via La Jolla Drive, Suite 2240
> La Jolla, CA 92037
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Writing on X without X device (!)
Next Topic: Re: Colour maps ... (BYTE_SCALE)

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

Current Time: Fri Oct 10 05:04:27 PDT 2025

Total time taken to generate the page: 0.88101 seconds