05-04-2022 10:23 AM
@GRCK5000 wrote:
Note: I do not want to add case 3.
Why the aversion to adding 3 or your case 2? That would meet your requirement. Is there another situation where you need the "3" case? What would the exact logic be for selecting the cases? Do you just want the maximum of the two "enum" values?
05-04-2022 10:28 AM
Hi,
you don`t want to add (3) to you case , you want to keep the same structure , you could change the case (2) as your default case. and when the result is (3) it goes to your default case.
Best Regards.
05-04-2022 10:33 AM
This is just a portion of the code I am working on. I have an extremely large code with 4 enums. What I am describing here is basically what I am trying to do with these 4 enums. By adding more case structures, I feel like my code will be way larger than it already is.
Note: Each of these 4 enums have 12 items (Numbers from 1 to 12).
I know there is a condition to force it to go to case 2 and I am still trying figure it out.
05-04-2022 10:41 AM
Okay, let's say I change case 2 to default and keep Enum I input 1 as shown below:
Then I change Enum II input to 2 as shown below:
I click on highlight execution, the run. Then VI. Yes, it will go to case 2 because it's the default case.
Now here is the problem, while it's running. I change Enum I input to 0. Now instead of going to 0 case., it will remain in the case 2 structure. I would like to go to 0 if I change input to 0.
05-04-2022 10:41 AM
@GRCK5000 wrote:
By adding more case structures, I feel like my code will be way larger than it already is.
Note: Each of these 4 enums have 12 items (Numbers from 1 to 12).
Nobody said anything about adding more case structures. We are recommending you add to the condition that you currently have for case 2.
So you have 4 enums with 12 elements each. Do you have a list of values and what cases you want called in every combination? Or a simplified logic that we could program up?
05-04-2022 10:43 AM - edited 05-04-2022 10:43 AM
I am telling you, crossrulz. You'll never believe how big my code is. It's ridiculous. I am still trying to figure the best way to make it small. It's been a struggle, I won't lie. Also, I am more of a visual learner. Maybe you can post a code. Maybe it will help me better understand what you mean.
05-04-2022 10:48 AM
Hi,
adding (3) to your case is that what is mean :
and for making the default case you should know all the possible combination depand on the input.
05-04-2022 10:57 AM
See. I am more of a visual learner. Now I learn something today. I didn't know I could do that with case structure. That's why I like this forum because of you guys. Thanks a lot crossrulz and Emna20.
Thanks for being so patient with me. I thought you guys would just give up on me.
05-04-2022 07:55 PM
For a deep dive into case structures, you can right-click on the border of any case structure and select "Help". There's a LOT of stuff there. (You can right-click on just about anything and get more detailed help in the same manner.)