LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Taylor.Kendall

More Powerful Case Structures

Status: Declined

Any idea that has received less than 7 kudos within 7 years after posting will be automatically declined.

 

I am sure that someone has suggested this before, and yes I know the workaround for floating point numbers, but being able to do regular expressions, comparasons and maybe simple bits of code (C/Matlab) would be nice.  

 

FP case structure.png

3 Comments
Ironman99
Member

Interesting idea.

However, I believe that the example shown here is very basic. I suppose that the case not shown is "Default". What about more complex structures? If the cases had 3 or more? Perhaps it would be very complex assess that they do not overlap, even if only partially. In the currently implemented Case structure is sufficient to check that different ranges are mutually disjointed. In a new structure in which it were possible to insert formulas, all possible VALUES of X should be evaluated to check that all cases are univoque . Not so simple, I suppose ... Imagine a Case structure with two cases as follow:

0<=X<3.1415
10<=tan(X)<100

For humans is easy to find that some values of X leads both the expressions to be evaluated as TRUE (X is supposed in rad), but i dont know if the same understanding is straightforward for the LV compiler.

A similar discussion took place here: http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Allow-regular-expressions-to-be-used-in-Case-structure...

 

Cheers.

AristosQueue (NI)
NI Employee (retired)

Not only is the mutual exclusion of such operations generally unsolvable, the precision of solutions can make mathematically exclusive options not exclusive when implemented in the digitized computer.

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 7 kudos within 7 years after posting will be automatically declined.