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

Home » Public Forums » archive » Re: Maddening structures
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: Maddening structures [message #50219 is a reply to message #50218] Mon, 18 September 2006 06:55 Go to previous messageGo to previous message
Edd Edmondson is currently offline  Edd Edmondson
Messages: 50
Registered: January 2003
Member
David Fanning <davidf@dfanning.com> wrote:
> Edd writes:

>> OK, I've got some data read in so that I have a structure that looks
>> like
>>
>> data.foo[600]
>> .bar[600]
>> .baz[600]
>>
>> and I want
>> data[600].foo
>> .bar
>> .baz
>>
>> In other words I want an array of structures rather than a structure
>> of arrays.
>>
>> Does anyone have any magic that works for the case when foo, bar and
>> baz are not previously known?

> names = ['foo','bar', 'baz']
> struct = Create_Struct(names[0], 0.0, names[1], 0.0, names[2], 0.0)
> data = Replicate(struct, 600)

Fine, unless there might be further tags (which you can then solve
with a bit of looping and executing), and complicated when they aren't
all floats but a mix of floats, ints, longs and strings. See my other
post...

Think I'm getting there though. Whether anyone will be able to manage
this code later is another question.

--
Edd
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: calculating rotations from a transformation matrix
Next Topic: IMSL coming to IDL

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

Current Time: Fri Oct 10 05:20:11 PDT 2025

Total time taken to generate the page: 0.56180 seconds