There are only two ways to tell somebody thanks: Kudos and Marked Solutions Unofficial Forum Rules and Guidelines "Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
The FOR Loop is configured to STOP on FALSE and the first value not in range, an to generate a FALSE, is on the second iteration of the loop when the value 2 is auto indexed and evaluated.
For 1st run, the indexed 1st value 1 stays within 0 and 2. For 2nd run, the indexed 2nd value 2 is also within 0 and 2 when "Include Upper limit" is checked. However, after 2nd run, the for loop ended, it will output a 2, too.
Can anyone give explanation how Ans is C. And what is the purpose of conditional terminal?
And also tell where I am wrong, since array size is 3 and conditional terminal is wired with 2, so Upper Limit for In Range and Coerce will be 2 and then it compares value ?
There is a lot happening in this VI. First of all, the array size is 3, but 2 is wired to the N. Therefore, the loop will only run at most twice. The conditional terminal can allow you to stop the FOR loop early.
So the idea here is that the loop will iterate until a value in the array is outside of the range of i and 2, not inclusive (the diamonds are not filled in). So when the indexed value is 2, the loop will stop and the coercion will output a 2 (the upper limit).
There are only two ways to tell somebody thanks: Kudos and Marked Solutions Unofficial Forum Rules and Guidelines "Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
"For 2nd run, the indexed 2nd value 2 is also within 0 and 2". I think that here is correct to say that for the 2nd run the value is checked between 1 and 2 and not 0 and 2. Don't you? Thanks
Plus the red dot means that there is a "conditional terminal" in the loop (continue if true).