From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
The chances that you screw up and the new function returns 0 is probably greater than the chances the existing function returns 0. How do you guard against that? Easy. You still check at the input of the affected function when needed, this way you catch all kinds of errors both known and unknown. Subtraction, multiplication, and Sin(x) could all give 0, do we check their outputs as well? There are a million ways to get a zero, stopping them at the source strikes me as a doomed effort. You may still let one slip.
Darin -- all this is is wrapping the random function in something that checks it -- no different than doing exactly what you suggest and then doing "create subVI". I've done that for any number of upstream functions. And this one is a bit different since the thing you need to do is go back upstream and re-roll.
We are working on adding a Random Number (Range) VI to a future LabVIEW release. We are not intending to include the ability to exclude the range limits. This functionality has limited use with floating point numbers, and explicit range values can be specified for the integer implementation.
National Instruments will not be implementing this idea. See the idea discussion thread for more information.”