Re: DLM structures passing [message #26460] |
Thu, 23 August 2001 15:52 |
ronn
Messages: 123 Registered: April 1999
|
Senior Member |
|
|
in article onn14qwlui.fsf@cow.physics.wisc.edu, Craig Markwardt at
craigmnet@cow.physics.wisc.edu wrote on 8/23/01 4:41 PM:
>
> Konrad Lang <klang@cosy.sbg.ac.at> writes:
>
>> I try to pass a structure consisting of structures to a DLM and did not
>> find a way how to obtain the data from
>> the inner structures. What I have done can be found in the following:
>>
>> IDL:
>> tt0= {a:0L, b:0.0}
> ...
>> test = {t1:tt, t2:rr}
>>
>> mydlm, test
>>
>> So, I have no idea about the data structure that will be passed to
>> the DLM mydlm with this call???
>
> I do not believe that passing structures to DLMs is presently
> documented. Presumably it is documented internally by RSI, but I have
> never seen how to do it from the existing public documentation.
>
Yes, you can do it and if you look really hard at the external development
guide you can find out the information. You first have to make sure that
the structure is defined identically on the C and IDL side. This means using
longs on the IDL side and IDL_STRING types on the C side. If you are
passing arrays of structures you also have to worry about some padding that
IDL does.
Like I said you can find all this in the external development guide (in the
IDL help directory, usually) or in Chapter 7 of my "Calling C from IDL"
book.
-Ronn
--
Ronn Kling
KRS, inc.
email: ronn@rlkling.com
"Application Development with IDL"� programming book updated for IDL5.4!
"Calling C from IDL, Using DLM's to extend your IDL code" NEW BOOK!
http://www.rlkling.com/
|
|
|
Re: DLM structures passing [message #26461 is a reply to message #26460] |
Thu, 23 August 2001 13:41  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
Konrad Lang <klang@cosy.sbg.ac.at> writes:
> I try to pass a structure consisting of structures to a DLM and did not
> find a way how to obtain the data from
> the inner structures. What I have done can be found in the following:
>
> IDL:
> tt0= {a:0L, b:0.0}
...
> test = {t1:tt, t2:rr}
>
> mydlm, test
>
> So, I have no idea about the data structure that will be passed to
> the DLM mydlm with this call???
I do not believe that passing structures to DLMs is presently
documented. Presumably it is documented internally by RSI, but I have
never seen how to do it from the existing public documentation.
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|