User | Kudos |
---|---|
13 | |
11 | |
3 | |
3 | |
2 |
I would like to see a case statement that would work like a switch statement in C. You could wire a cluster of information to the input that has all the data of interest in it, such as the values of A, B, C, and D. Each page of the case statement would have a complex logic statement that defined what it handled, such as "A<3 and B>4". If this was false, it would drop through to the next case. If none of the cases were true, it would drop down to the default case which would always be last.
Another possibility instead of a cluster would be using one input for each variable, just like the formula node uses. You could enter a name for each input that would be used in the case statements.
This would have saved me a bunch of time in a recent program, where there were three possible values for A and three for B, as well as C and D. The cases ended up being nested four deep, which is something of an editing nightmare. The ability to do multiple comparisons within a single case statement would have been wonderful.
It might be a little confusing to keep track of the order/priority of the cases. We might need some sort of tool for viewing the whole list of cases and editing each case, sort of like editing the list of values for an enum.
This idea was inspired by JeanPierre's request for an if else statement.
Bruce
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.