[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: variable types in external C modules



"D. Mattes" wrote:
> 
> hello IDL gurus:
> 
> i am using call_external to run computations in external C modules.  i
> want to send arrays of different types to the C module and have them be
> correctly declared in the C module.  for example, if the IDL procedure
> sends floats, then the C module needs to declare the incoming arguments as
> floats, and be able to create some scratch memory of type float.
> however, if the IDL procedure sends doubles, then the C module needs to
> declare the variables as doubles.  how can i determine the variable types
> of the input arguments from within the C module?
> 
> thanks!
> david

I'm fairly sure that the CALL_EXTERNAL interface doesn't pass on any 
information about the type of variable used in the call. It's pretty
much a case of you have to pass what the external code is expecting.

Can you pass an additional argument, the typecode of the array obtained 
from the size function?

-- 
-----------------------------------------------------------
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