NI Home > Community > NI Discussion Forums

LabVIEW Developers Feature Brainstorming

Reply
Member
CMFrament
Posts: 1

Re: Looking for user feedback on an If-Then-Else-If structure

I don't know is this is still up for debate, but...

Why don't you just have a normal case structure, which will allow you to pass an array or cluster of booleans.  If the array or cluster size is one, or if it is just a boolean and not an array or cluster, then the case structure functions as is.  If the size is greater than one, then the structure will adjust to contain n+1 many cases.  Again size equals 1 results in two cases, true/false.  In addition a cluster will allow the programmer to name the booleans, these names should show up in the selector lable box.  The last case, if there are more than one booleans, will always be else.  One more thing the porgrammer should be able to reorder tha cases as he or she sees fit.  Therefor if the title of the first boolean is Happy?, then it will show up in bthe selector as "1: Happy?" but the option would exist to make it "3: Happy?" or whatever integer, as long as it is less than the cluster size.

Active Participant
Broken_Arrow
Posts: 1,846
0 Kudos

Re: Looking for user feedback on an If-Then-Else-If structure

CMFrament,

Maybe you should Post an Idea at the Idea Exchange about an adaptive case statement that accepts a cluster.

Richard





Active Participant
Vaibhav
Posts: 397
0 Kudos

Re: Looking for user feedback on an If-Then-Else-If structure

CMFrament,

 

If the cluster can be passed, as Broken Arrow suggested above to post in the Idea Exchange, I still don't get how the "true" condition will be decided in the first place.

 

The main issue is, how at a single point can we decide the condition to be satisfactory?

Execution is the next step, but decision is the first step and in your proposal I don't get how the decision making will take place. Can you please post an image / code for that? (I am using LV 8.6).

 

Thanks!

Vaibhav