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

Home » Public Forums » archive » Re: Structure compare
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Structure compare [message #52885] Thu, 08 March 2007 07:17
news.verizon.net is currently offline  news.verizon.net
Messages: 47
Registered: August 2003
Member
On Mar 8, 8:43 am, "Andre Abrantes" <andreabran...@gmail.com> wrote:
> Hi All.
>
> I want to know if exists any function, procedure or method to
> compare 2 generic structures.
>

I'm not exactly sure what you are looking for, but the function
compare_struct.pro in

http://idlastro.gsfc.nasa.gov/ftp/pro/structure/compare_stru ct.pro

will find matching tag names and then create a new structure
specifying the matching tag names with different values. For
example, to see how the !X system variable changes after a plot:

IDL> x = !X ;Save original values
IDL> plot, indgen(25) ;Make a simple plot
IDL> help,/str,compare_struct(x,!X) ;See how structure has
changed

--Wayne
Re: Structure compare [message #52887 is a reply to message #52885] Thu, 08 March 2007 06:48 Go to previous message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Mar 8, 7:43 am, "Andre Abrantes" <andreabran...@gmail.com> wrote:
> Hi All.
>
> I want to know if exists any function, procedure or method to
> compare 2 generic structures.
>
> I wanna somethink different from :
>
> ...
> help, stcA, /struc, output = strA
> help, stcB, /struc, output = strB
>
> if strA eq strB then
> ...
>
> Thanks in advanced.
> André Abrantes.

How about looping through the TAGS and doing compares on each of them
using size()?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Structure compare
Next Topic: Re: strange behaviour of ladfit - known?

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

Current Time: Wed Oct 08 18:39:34 PDT 2025

Total time taken to generate the page: 0.00582 seconds