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

Home » Public Forums » archive » Re: Arrays of 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: Arrays of Structures [message #20465 is a reply to message #20450] Wed, 21 June 2000 00:00 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
The function STRUCT_ASSIGN was created in newer versions of IDL to
perform so-called "relaxed" structure assignments -- exactly what you
want. Alas, I do not believe it will work on array elements since
they are pass-by-value.

Craig


Ben Tupper <tupper@seadas.bigelow.org> writes:

> Ah!
>
> I think I get it. Anonymous means anonymous... but it is still unique (until
> redefined).
>
> S1 = {a:0, b:.1, c:''}
> A = Replicate(S1,3)
> S2 = S1
> S2.c = 'bob'
> A[1] = S2
>
> IDL> help, s1,s2,/str
> ** Structure <37d658>, 3 tags, length=16, refs=3:
> A INT 0
> B FLOAT 0.100000
> C STRING ''
> ** Structure <37d658>, 3 tags, length=16, refs=3:
> A INT 0
> B FLOAT 0.100000
> C STRING 'bob'
>
> IDL> S1 = {X:1, Y:'y'}
> IDL> help, s1,/str
> ** Structure <37fda8>, 2 tags, length=12, refs=1:
> X INT 1
> Y STRING 'y'
>
> Thanks,
>
> Ben
>
>
> --
> Ben Tupper
>
> Bigelow Laboratory for Ocean Science
> tupper@seadas.bigelow.org
>
> pemaquidriver@tidewater.net
>
>
>

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Questions on External Development examples
Next Topic: A (too?) simple question about importing data

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

Current Time: Wed Oct 08 19:36:18 PDT 2025

Total time taken to generate the page: 0.00440 seconds