Double variables can have the non-numerical values NaN, +Inf and -Inf. I would also like to be able to give them the value Undefined, and that applies to all kinds of variables (integer, boolean, string, etc.). This could solve issues that other users have posted:
- To make a test for inputs of subVIs if they are wired or not. Give them Undefined as the default value.
- A ternary boolean.
- If you want to force the user to fill inn data in the main program, there must a way to see if data has been entered and not a default value. This can be done by setting Undefined as the default value.
How to handle the Undefined value:
Any operation on an Undefined value should give Undefined as a result. The only exceptions are two test blocks [Is Undefined] and [Is Defined].
This can also be useful for debugging in a tangled block diagram to see if input A really has a connection to output B. If it is, then B should be Undefined if A is set to Undefined.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.