NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding an elements in array

Two array A n B. I need A + (n-1 )B ,add content A with previous B elements. Is there a function like GetArrayOffset to get previous index array content? I use the format -1, teststand inform out of bounds error, but when I run the sequence file, it work. How to stop teststand informing the error? 

0 Kudos
Message 1 of 2
(2,193 Views)

Hi mingchew,

 

I guess you get the error on the first iteration when n = 0 and as a consequence you are using -1 (0 - 1) as an index into B? 

 

You will need decide what to do on the first iteration when you don't have a previous value to use to index into B then use a conditional statement that decides what to do based on the value of n. 

 

Hope this helps

 

Steve

0 Kudos
Message 2 of 2
(2,174 Views)