The Daily CLAD

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: In Range and Coerce

SercoSteveB
Active Participant

What is Numeric Value Out following execution of the VI?

In Range and Coerce.png

a) 0

b) 1

c) 2

d) 3

Comments
crossrulz
Knight of NI

C


GCentral
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
Somu26
Member

Answer is 2

shree_bala
Member

C

Amiri
Member

C

ramesh44
Member

C

LordNobady
Member

c


Learning LabVIEW since January 2013
pksusic
Member

c) 2

MrStevenUND
Member

C

ashwinilele
Member

C

eleshrudra
Member

ans is c 2

R.Elesh
Fuzzy Me
Member

C

SercoSteveB
Active Participant

Answer: C.  Nice one crossrulz, Somu26, shree_bala, Amiri, ramesh44, LordNobady, P.KARUPPASAMY, MrStevenUND, ashwinilele, eleshrudra & Fuzzy_Me.

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.

chan1989
Member

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.

What is the meaning of the red dot in N?

achalabhi
Member

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 ?

crossrulz
Knight of NI

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).


GCentral
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
R.Menaka
Member

ans:c) 2

M.P.Bharghavi
Member

Ans: C

2

N.UdhayaKamali
Member

C

federicoD89
Member

"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).

best