Re: Structure compare [message #52885] |
Thu, 08 March 2007 07:17 |
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  |
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()?
|
|
|