NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

define string as "empty" or "nothing"

Solved!
Go to solution

Hello,

 

I know that a can define a number as "NaN" - this is great, because it's a nice way to check weather the variable is filled yet. But is it possible to make something similar with string? Something like string = "empty" or "nothing"...

 

Thanks for your help

 

Jonathan K.

0 Kudos
Message 1 of 3
(4,480 Views)
Solution
Accepted by topic author JonathanK

There is a Len() funtion for strings. What about  assigning "" to the strings and considering a string with Len() = 0 as empty ?

0 Kudos
Message 2 of 3
(4,475 Views)

stringVariable == "" should also work. String variables are initially empty in TestStand unless you explicitly specify a different initial value.

0 Kudos
Message 3 of 3
(4,470 Views)