Here's an example of the new If..Then..Else primivitve introduced in SM 2.0.3...
The one on the left is probably easiest to understand ..
Type - String, so all the "Conditions" are treated as strings
If - your ibput value that you want to test goes in here
Op - the type of comparison, in this case we're seeing if the input is an exact match for one of the conditions
Conditions - the primitive works down this list from top to bottom, stopping when it finds a comparison which is true. In this case it will stop if the input matches exactly any of the strings in the array (because the 'Op' is "=").
Then - each item in this list pairs up with each one in the 'Conditions' list - this is the output that you will get if the condition is true. So in this case "one"-->"sheep", "two"-->"cow", etc.
Else - if no match is found in the conditions list, you get this output instead.
The right hand example is a bit tricker, but essentially works the same way.
Type - Float this time, so the strings at the 'If' and 'Conditions' inputs are now treated as numbers rather than strings. Important, because if you used strings, "100.00" would not equal "1e2" - but as floats, they are the same number.
If - the input
Op - I used 'Greater' this time, to demonstrate a particular point...
Conditions - this time we're looking through the list until we find a number where the input is greater - but CARE NEEDED - say I had put 0.25 as the first number, and the input is 0.9 - 0.9 is greater than 0.25, wahay, it's true, BUT the rest of the list will not get scanned, so we'd never find out that 0.9 is greater than 0.75 too. So if using the primitive to sort numbers - be careful what order you list the conditions.
Then - as before, the output is the 'Then' value with the same index as the 'True 'Condition'
Else - as before, the default value if there is no match.

















