LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does compare aggregates mode produce incorrect results?


@Technico wrote:

 

I have the impression the Compare Aggregates only returns the first element of the Compare Elements.

--> When swapping 5 and 25 the compare Aggregates becomes false.


Like I said, the aggregate comparison is done IN ORDER. That means that if the first element is out of range, then there's no need to compare further.

 

I will give the phone book example again, but try to make it clearer. Let's say you have these names:

 

  1. Doe, John.
  2. Garner, Thomas
  3. Smith, Mike

If you were asked if #3 is between 1 and 2, the answer would be no, and you could say that as soon as you look at the surname, because no Smith can be between Doe and Garner. That's what's happening here.

 

I can't test, but I suspect that if you change the first element from 5 to 20, LV would go to the next element to do the comparison, because the first one isn't enough. That would be like saying that #2's last name is also Smith.


___________________
Try to take over the world!
0 Kudos
Message 11 of 11
(319 Views)