spec

Software for Diffraction

2.3.16.5. - Ternary Operator

spec, like the C language, has one ternary operator, which works in a manner similar to the if-else construction and uses the characters ? and :. Its use is
expression1 ? expression2 : expression3
where the result of this entire expression is expression2 if expression1 is nonzero, otherwise expression3.