Is it possible... (making or/and statements with 3+ variables)

@Kermit_Who, If the vars have to be numbers, then you can get by with one extra pair of parentheses on your original example:

*if ((var1 = 1) or (var2 = 1)) or (var3 = 1)

If they can be true/false (Booleans), then you can get by with even fewer parentheses, because in CS ‘*if var1=true’ can be shortened to ‘*if var1’. So to check if any of them are true, I believe this should work:

*if (var1 or var2) or var3

1 Like