11-21-2012 04:01 AM
Hallo everyone;
I want to do the following, one case structure inside a for loop connected to it the following conditions, when i = 1 then do something, when i = 2 do another thing , when i = 3 ..... till i = 5
i can do it with 5 case structures but i want to know if its possible to do it with one and how?
thanks
11-21-2012 04:12 AM
Wire the integer value to the case selector and have as many cases you want. Generally Enum data type is used for this purpose.
11-21-2012 04:15 AM
When you wire a numerical input to the case structure, you would orignaly have two cases
ex: I wire the case structure terminal to 'i' value of the For loop. then, the cases i have will be, '0, default' and '1'.
right click on the case strucutre, select Add case after. you will get a new case of i=2.
right click again and repeat to get as many cases as you want. if you want to change the case value, to example 12 instead of 2, delete 2 and enter 12 there.
11-21-2012 05:44 AM - edited 11-21-2012 05:46 AM
Hi valdi,
did you consider reading the context help for the case structure? It explains all the details...