I keep finding myself trying to do conditionals like
(n > a AND n < b) OR (n > y AND n < z)
...which, unsurprisingly, doesn't work.
Am I missing a trick? Example of where this would be useful here.
You can do it with ternaries (ignore the colours, I didn't define the variables)
....but that feels clunky (and leaves me scratching my head when I look at it the next day!).
Proper ternaries example -- change
Local_test, as it stands values of
true while all others
Boolean Test.kmmacros (4.0 KB)
And (and this is where my head explodes), nested ternaries for when you want "3 truths", such as
n is greater than
a, less than
b, and an even number"
where you can use
n > a ? (n < b ? n MOD 2 = 0 : 0) : 0
In this example, testing "in one range and even or another range and odd",
Local_test of either
true while other values are
Boolean Test Nested.kmmacros (4.1 KB)