LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert 0 to "fail" and 1 to "pass"

Solved!
Go to solution

... and this one, with the numeric input.

 

Message Edited by jcarmody on 03-24-2009 02:59 PM
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 11 of 14
(628 Views)

One more option:

 

Index array on ['failed,'pass'].

 

Felix

0 Kudos
Message 12 of 14
(608 Views)

F. Schubert wrote:

Index array on ['failed,'pass'].


That's probably what I would have picked. The "select" is dangerous because you get valid outputs for invalid inputs (e.g. inputs of -100 or +5,  would return a "passed" in Dennis's solution above. That's not good! :()

 

The solutions by Jim and Felix (image below) output an empty string if the input is out of range, which seems safer.

 

 

 

Message Edited by altenbach on 03-24-2009 05:58 PM
Message 13 of 14
(589 Views)

I actually picked up that way of coding from someone in this forum now having a 10k sign.

 

Felix

Message 14 of 14
(584 Views)