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

Home » Public Forums » archive » Re: Structure of Structure
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: Structure of Structure [message #11330 is a reply to message #11312] Tue, 24 March 1998 00:00 Go to previous messageGo to previous message
Thomas A. McGlynn is currently offline  Thomas A. McGlynn
Messages: 23
Registered: March 1996
Junior Member
Stephan Oerder wrote:
>
> Thanks a lot !!!
> I tried it already on a PC-IDL-System !!!!
> But we need it on a VAX-VMS-System !!!
> Do you (or somebody else) have the PRO-File of "Create_Struct(...)" ???
> Stephan
>
> Theo Brauers wrote:
>> You may try:
>>
>> m1 = create_struct('a', 0, 'b', bytarr(12))
>> m2 = create_struct(name='m2_str', 'a', 0, 'c', fltarr(12))
>> ; array of structures
>> m3 = replicate(m2, 3)
>>
>> m = create_struct('a1', m1)
>> m = create_struct(m, 'a2' , m2)
>> m = create_struct(m, 'a3' , m3)
>>
>> Best, Theo
>> ----------------------------------------------
>> Dr. Theo Brauers
>> Institut fuer Atmosphaerische Chemie (ICG-3)
>> Forschungszentrum Juelich
>> 52425 JUELICH, Germany
>> Tel. +49-2461-61-6646 Fax. +49-2461-61-5346


You might also want to look at a function I wrote a few years
ago called MRD_STRUCT. It takes two string array arguments. The
first gives the names of the structure columns and the second gives
a prototype for what the column should look like.

E.g., A call would might look like:

names = ["name_for_col1", "name_for_col2",...]
vals = ["dblarr(10,10)", "0L", "intarr(3,2,4), ...]

str = mrd_struct(names, vals)

with additional optional arguments to create an array of
structures or to define the structure type. If you request a
structure of more than 128 elements, then the routine automatically
creates substructures, putting the first 64 elements in the
top level structure, the next 64 in a structure as the 65th element
and so forth. I believe this has run successfully on VAXes
for versions of IDL > 3.6.

It's available in the IDL Astronomy library at:

http://idlastro.gsfc.nasa.gov/ftp/pro/structure/mrd_struct.p ro

Good luck,

Tom McGlynn
tam@silk.gsfc.nasa.gov
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: passing pointers to CALL_EXTERNAL
Next Topic: Compatibility of MAP functions between IDL & wave

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

Current Time: Sat Oct 11 00:56:34 PDT 2025

Total time taken to generate the page: 0.88228 seconds