erasing a post? [message #91043] |
Wed, 27 May 2015 09:08  |
Helder Marchetto
Messages: 520 Registered: November 2011
|
Senior Member |
|
|
Hi,
I just tried to "answer" a post and when I hit the "post" button I found out that the message was deleted. I find it not nice to erase a post. People might have already read it and spend time on it. If it was a mistake or if you have thought of things through and you don't want an answer anymore, simply answer you own post with a "sorry, don't need this anymore".
[edit: I'm not pissed or anything, I'm just trying to make a point that it is not a drama to have a post out there that you don't need anymore]
Anyway, if anybody *still* is interested, here is my answer to the post (unfortunately I did not copy the original message: the poster wanted to compare structures):
Good evening,
there are a lot of ways of tackling this. But generally with structures you have to go through element by element. You may google compare structures and find a few solutions/suggestions on the group.
One other way of doing this (probably computationally more expensive, but slightly easier to understand) is to use hashes (http://www.exelisvis.com/docs/HASH.html). So for each structure you generate a hash:
h1 = hash(myStruct1, /extract)
h2 = hash(myStruct2, /extract)
then you can compare with the EQ or NE operators to check which values are equal or not equal. The result is a list. Here you will find an example:
http://www.exelisvis.com/docs/HASH.html#Comparing
Notice that you need IDL >8.0.
I hope it helps,
Helder
|
|
|