Hi Falcon,
You can accomplish what you want to do; however, it can get a little ugly. In TestStand, the case structure evaluates the expression and then passes the value of the entire expression back to compare with the select. I'm sure you saw this if you tried 5 || 10 || 18 || 29, which should have returned a 1. Because this is how TestStand handles the case statement, in order to place multiple cases on the same statement you need to construct a statement as such:
Select (Locals.a)
Case(Locals.a == 5 ? 5 : Locals.a == 10 ? 10 : Locals.a == 18 ? 18 : Locals.a == 29 ? 29 : -999)
{
Locals.b = 9
}
In this statement, it evaluates whether Locals.a is 5 and then returns 5 (which would cause the select statement to choose the case) or checks if it is another value. The -999 will return if Locals.a fails all of the conditional statements and is a value that I should not ever show up in my select statement.
As you can see, it is a very ugly statement. Instead, I would recommend using If/Else If/Else statements for your flow control. While the statement is still long, it is a bit cleaner and easier to read.
If(Locals.a == 5 || Locals.a == 10 || Locals.a == 18 || Locals.a == 29)
{
Locals.b = 9
}
Matt M.
National Instruments