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

Re: Arrays of Structures



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