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

Home » Public Forums » archive » Structure Arrays
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 Arrays [message #50479 is a reply to message #50350] Fri, 29 September 2006 04:45 Go to previous message
greg michael is currently offline  greg michael
Messages: 163
Registered: January 2006
Senior Member
I think struct_assign does it...

IDL> t1={a:0,b:0,c:0,d:4}
IDL> t2=replicate(t1,10)
IDL> print,t2
{ 0 0 0 4}{ 0 0 0 4}{
0 0 0 4}{ 0 0 0 4}{
0 0 0 4}{ 0 0 0 4}{ 0
0 0
4}{ 0 0 0 4}{ 0 0 0
4}{ 0 0 0 4}
IDL> s1={a:1,b:2,c:3}
IDL> s2=replicate(s1,10)
IDL> print,s2
{ 1 2 3}{ 1 2 3}{ 1 2
3}{ 1 2 3}{ 1 2 3}{ 1
2 3}{ 1 2 3}{ 1 2 3}{
1 2 3
}{ 1 2 3}
IDL> struct_assign,s2,t2,/nozero
IDL> print,t2
{ 1 2 3 4}{ 1 2 3 4}{
1 2 3 4}{ 1 2 3 4}{
1 2 3 4}{ 1 2 3 4}{ 1
2 3
4}{ 1 2 3 4}{ 1 2 3
4}{ 1 2 3 4}

regards,
Greg
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Expanding Arrays of Structures
Next Topic: IDLWAVE and call-external

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

Current Time: Sun Oct 12 00:22:58 PDT 2025

Total time taken to generate the page: 1.61004 seconds