Not a Refnum Constant returns a refnum whose value is
Not A Refnum. You can use this refnum as an output from structures and subVIs when an error occurs.
For example, you can use the Not a Refnum constant to verify that the refnum is valid before passing the refnum to the next file I/O operation. Wire the error out cluster of a file I/O function to the selector terminal of a Case structure. Place the Not a Refnum constant in the
Error subdiagram and wire the constant through the output tunnel and to the next file I/O operation. In the
No Error subdiagram, wire the refnum output of the file I/O function through the Case structure and to the next file I/O operation.
||Reference returns a refnum whose value is |
Not A Refnum.
Do not test whether a refnum is invalid by comparing the refnum to the output returned by the Not a Refnum constant. The Not a Refnum constant returns a unique sequence of bits that is guaranteed to be an invalid refnum. However, because this sequence of bits is only one possible invalid refnum representation, it likely will not equal another refnum to which you compare it. Instead, use the Not A Number/Path/Refnum? function to test whether a refnum is invalid. The Not A Number/Path/Refnum? function returns a Boolean data type value that is correct for all possible invalid refnum representations.
||More info to come.