02-18-2011 08:07 AM
Hi,
Recently, I wanted to add two the same size arrays of numbers, but it looks like in TS the '+' operator is defined as overloaded.
Do someone know why?
K.
02-18-2011 11:06 AM
I'm not sure what you mean. Please describe what you mean in more detail. Are you trying to add the elements from one array against the corresponding elements of the other array or are you trying to append the arrays to each other. If you want to add the elements from one array against the elements of another array, you will need to use looping options or one of the looping step types.
Hope this helps,
-Doug
02-21-2011 04:30 AM
Yes, I'd like to the elements from one array against the elements of another array. And frankly speaking I was expecting the '+' operator to be overloaded and not to do looping to do the operation.
Does anyone know is the any reason why the '+' (and probably others operators ) are not overloaded?
02-21-2011 11:32 AM
What you are expecting also does not work in C, C++, and C#. I am unaware of any text-based programming language that allows you to add the elements of an array like this.
However, feel free to suggest this on the Idea Exchange ( http://forums.ni.com/t5/NI-TestStand-Idea-Exchange/idb-p/teststandideas ) if you feel this would be a useful and important feature for TestStand to have.
If you need help with how to do the looping, please let us know.
Hope this helps,
-Doug
02-21-2011 11:45 AM