LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[Bug?] Comparing 2 different variants they result as if equal

Hi everybody,

I have read a bug report about this happening in LV 8.6 when extracting array subset.

I am on LV 8.5.1 and I am not using the subset function, rather the 'delete portion'.

I cannot reproduce this behavior out of this structure. I read the i-th element from the deleted portion and compare it with variant in a shift register.

The probes (see picture) show as the variant in the present iteration have different values: in fact, I am comparing 'TRYTRYTRY' against 'OP10_1_Valore_1_M1' and they are found equal.

Variant tutorial at http://www.ni.com/white-paper/4998/en says:

"

Two variants are equal when they meet the following requirements:
--They have the same data type.
--They have the same value.
--They have the same named attributes. (The attributes can be in any order.)

"

But I am clearly comparing variants with different values.

I tried flattening to string the two data, but two empty strings are returned, with identical result.

Data is coming from an SQL query.

Anybody has hints? Thank you in advance

0 Kudos
Message 1 of 3
(2,542 Views)

HI,

 

I tries to reproduce the problem with Labview 2011 but all works fine. Could you update the software to solve the problem? 

 

Kind regards,

 

Enzo

0 Kudos
Message 2 of 3
(2,488 Views)

Hi Enzo,

I solved converting variants to string at each iteration (not through "flatten" but "variant to data") in the cycle, i.e., what I wanted to avoid since I don't really need the value. Anyway, I could do what I needed to.

Thank you

 

0 Kudos
Message 3 of 3
(2,467 Views)