LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Is Value Changed.vim" and NaN

I know that NaN never equals anything (even itself).  So I'm unsurprised that if you feed "Is Value Changed.vim" an NaN, it will always return True.  I think I'm okay with that.

 

I just wanted to float this comment out to see if anyone else felt differently (or perhaps was unaware of this).  Does anybody think a clarification be included in the help documentation for "Is Value Changed.vim"?

 

NaN.png

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

NaN is not a number, but it is a "value".  Is Value Changed is usually used to see if following code needs to be rerun because the result will be different due to a change in the value.  Is Value Changed is not about numbers at all, so I would say that NaN should not count as "changed" from NaN.

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

What we would rather have is the LabVIEW equivalent of the "is()" function in Javascript:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is

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