Invalid
| Description: | Return Invalid Value. This function always returns an invalid value. |
| Returns: | Invalid |
| Function Groups: | Logic Control, Variable |
Usage: ![]() |
Script or steady state. |
| Related to: | Valid |
Format: ![]() |
Invalid() |
| Parameters: |
None |
| Comments: | This function is useful to invalidate data that are found to be incorrect, or to disable statements or functions that will not execute with invalid parameters. |
Examples:
x = Valid(Invalid());
This will set x to 0.
Another example of this function's usefulness follows:
Main [
If !Valid(a);
[
a = Scale(Rand(), 0, 1, -1000, 1000);
...
]
If Valid(a);
[
...
a = Invalid();
]
]
By toggling between a valid and an invalid value, you can ensure that the two scripts in Main will take turns executing. It is not possible for a race condition to occur.
