Now I am working on a program with vee. The main function is to conduct several tests,for every test parts will be compared with the specified spec value. I now use the "comparator" and it will return the result of this test part.Because it should be say the sample is passed only after all the test parts return the pass result,but I don‘t know how to realize this.So is here someone can suggest how to realize the function?
Howdy. Looks like maybe noone else is ready to give an answer, so...
If you have a bunch of tests that have pass/no pass outputs from comparators, which it sounds like you have, then a very simple answer to decide if all the tests pass is to collect the results into an array (A) and then take the product (product(A). If the product is true then all the tests have passed. Why? well each failed test returns a FALSE and VEE follows the C standard of FALSE is equivalent to 0 (zero). Which means that product is equivalent to a logical AND. Hence if any of the tests fails it has a zero result and the overall product is zero. If all pass the overall product is TRUE. So collect your outputs and feed to an IF/THEN/ELSE with product(A) as the argument and you are done.