There are two things that bother me about the index array. I think these changes would be useful to nearly all LabVIEW users.
- The default value is not optional (for integers always zero, a very useful value) There should be a way to set the desired value if the index is out of bounds.
- There should be a way to get rather the index is out of bounds from this primitive since this has to be check anyhow to know whether to use the default value. should look something like this:
The lack of these items usually proves to generate code that looks much uglier than necessary.
Although I do not know the internal workings of this primitive it would be hard for me to believe that this would have much of a performance impact. Also, bound checking arrays is necessary for many algorithms, why do it twice?