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

Home » Public Forums » archive » Re: How to add a new tag to N 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: How to add a new tag to N structures [message #70014 is a reply to message #70013] Wed, 03 March 2010 10:07 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Mar 3, 11:46 am, nata <bernat.puigdomen...@gmail.com> wrote:

> For some reasons I can define the C tag before so I have to add to
> each struct later. There is a way to do that without creating the new
> struct array and copying each field separately ?

Well, I don't know how to avoid creating a new structure but you can
use STRUCT_ASSIGN to copy fields from the old structure to the new
one.


IDL> str={a: 3l, b: 'v'}
IDL> str_arr=REPLICATE(str,10)

IDL> str1={a: 3l, b: 'w',c:0l}
IDL> str1_arr= REplicate(str,10)

IDL> struct_assign,temporary(str),str1

where I changed the initialization values so one can verify that the
"relaxed structure assignment" is working.

--Wayne
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: MOD09 Data in ENVI
Next Topic: Re: MOD09 Data in ENVI

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

Current Time: Fri Oct 10 07:51:28 PDT 2025

Total time taken to generate the page: 0.40153 seconds