What's new

Load non-persistent array funny behavior


New Member

I'm having an unexpected behavior on loading an array.
The array is declared (non-persistent) and then loaded.

If load is successful (eg. nka found) the array load it's expected values, but if the nka is not found (load won't work, as confirmed by checking NI_ASYNC_EXIT_STATUS) the array seems to carry the values saved from the Nki previously (as if there was some sort of persistence). I expected instead having an initialized array (all zero's), after declaration and loading unsuccessful, isn't it?

Does anyone confirm this behavior?



What I've done to workaround this is read it and zero it before the load_array, ie:
declare %array read_persistent_var(%array) for count:= 0 to num_elements(%array)-1 %array[count]:= 0 end for load_array_str(%array, !filepath)
Top Bottom