In this thread on LAVA, Aristos Queue points out some common usage patterns of the "Not A Number/Path/Refnum?" function that can result in performance problems and/or race conditions. He recommends either (1) comparing a refnum against a null constant value, or (2) trying the refnum operation you were going to do anyway, and using the error output from that operation to determine if the refnum was valid.
I propose a VI Analyzer Toolkit test that checks for this scenario called "Not A Refnum Usage". The test would return a failure under the following circumstances:
If these conditions are met, the test would return a failure, and would make the two recommendations mentioned above as alternatives to using the "Not A Number/Path/Refnum?" function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.