03-24-2009 02:57 PM - edited 03-24-2009 02:59 PM
03-24-2009 04:19 PM
One more option:
Index array on ['failed,'pass'].
Felix
03-24-2009 07:58 PM - edited 03-24-2009 07:58 PM
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.
03-24-2009 08:21 PM
I actually picked up that way of coding from someone in this forum now having a 10k sign.
Felix