LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
gnilsson

while loop stop on default

Status: New

while loop can stop/continue on Boolean or Error, why not also on default value.

 

gnilsson_1-1613944658719.png

Could be

gnilsson_2-1613944794749.png

 

4 Comments
AristosQueue (NI)
NI Employee (retired)

Personally, that would be a bridge too far for me... it's just too much implied magic and easy to read over, in my opinion. So as a LabVIEW user, I would not advocate for this change. But I will leave the idea open to see what other users have to say.

Intaris
Proven Zealot

That's bordering on code obfuscation.

 

Add in dynamic dispatch methods into the chain producing the data and the default is actually not even known at compile time.

AristosQueue (NI)
NI Employee (retired)

Related to this, I am an advocate for adding a method to a LV class that is language-defined to be "call this to do conversion to bool", and that would allow that specific class to be wired to the While Loop terminal. But that would be a well-defined thing on a specific type that is intended for the purpose, not a general language shift.

Intaris
Proven Zealot

That certainly sounds itneresting AQ.