Not a Refnum Constant: Difference between revisions
Added page |
No edit summary |
||
| Line 1: | Line 1: | ||
{{stub}} | {{stub}} | ||
{{LabVIEW Palette Object Information|palette=Functions Palette/Programming/File I/O/File Constants{{!}}File Constants palette|type= | {{LabVIEW Palette Object Information|palette=Functions Palette/Programming/File I/O/File Constants{{!}}File Constants palette|type=constant|icon=File Constants Palette - Not a Refnum Constant.png}} | ||
'''Not a Refnum Constant''' returns a refnum whose value is <code>Not A Refnum</code>. You can use this refnum as an output from structures and subVIs when an error occurs. | '''Not a Refnum Constant''' returns a refnum whose value is <code>Not A Refnum</code>. You can use this refnum as an output from structures and subVIs when an error occurs. | ||
Latest revision as of 18:21, 8 June 2021
| |
This article is a stub. You can help LabVIEW Wiki by expanding it. Please improve this article if you can. |
| Object information | |
|---|---|
| Owning palette(s) | File Constants palette |
| Type | Constant |
| Requires | Basic Development Environment |
| Icon | |
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.
Usage
| Data Type | Name | Description |
|---|---|---|
| Reference | Reference returns a refnum whose value is Not A Refnum.
|
Comparing References
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.
History
| |
History information is needed. What changes have occurred over previous versions? |
| Version | Change(s) |
|---|---|
| More info to come. |
See Also
External Links
| |
Add links to external resources that would also help. |