As I said....I have to do this with several cases where the T/F that matter change position, and I have to do this within quite a few arrays.
A built-in function T/F instead of T or F within an array would have helped. In a single line for one value, a walk in a park, but within an array?
You don't like my question?......just don't reply!
You can't give a solution, a hint or an answer?........do the same!
Aye I ll give ye warp 7, even if I have to get out and push
Spock: it is just not logical to infer without understanding the specifics!
Kirk: Danm the specifics, results and your logic! What we need here is the right answer!
To the OP: you've received many responses from very knowledgeable posters who are willing and able to give excellent help. What *you* need to do is present your question excellently as well, as has been requested.
Thanks a lot (also to Gerd), that's a great work around.
Mine wasn't quite that elegant.
as said several times before: creating a mask to handle your boolean arrays is quite easy!
The implementation at the bottom shows how to create such a mask and how simple the comparison will be after using the mask!
(Even more simplification: you can replace the ArraySize/InitArray combination by an AND with FALSE.)
As others have said, you need an array to mask the results that you don't care about.
Then simple boolean operations handle the rest.
Oh, I think the magic 8-Ball is finally spinning! Restated,
The result should be (A AND B) OR C
< otherwise written (A×B)+C>
Simple enough to implement and no loops required.
Then the OP is also hoping for a better way to apply the expansion (A+C)×B <Note, you can't mask an observation > and wishes for a data datatype that combines the A+C term.
LabVIEW uses an Enuerated type for that! The NI HSDIO examples include the logic implementations. The Enum elements are <TRUE, FALSE, HIGH, LOW, X> as U8.
SuperCoder trick - Run the array of that enum through Quotient and Remainder modulus 2 and then the Remainder through 0 1 to boolean And negate ( or simply increment the input) to do most operations directly on boolean data. (XOR and IMPLIES need special treatment since X, don't care, must always be the identity operator)