There is no special operator or function for conditional evaluation. I could add one easily, but then next someone would ask for loops and someone else for user-defined functions, variables and so on. If you need a programming language, you know where to find it.
But don't worry. The answer is, that conditional evaluation comes for free with TEAPOT's orthogonal cell addressing. As an example, depending on the cell labelled X being negative or not, you want the result to be the string BAD or GOOD. This is a solution:
eval(BAD + &((@(X)>=0),0,0))Note this is making use of the fact that you can add locations in the natural way. The cell labelled BAD contains the string BAD, its right neighbour contains the string GOOD. If you have nested conditions, you could weight them with 1, 2, 4 and so on to address a bigger range of cells. Alternatively, you could make use of all three dimensions for nested conditions.
Sometimes you can also get conditional-like behavior using the logical expressions. Suppose you want to use the value of the cell labeled OPTION if it is non-empty and non-zero, and the value of the cell labeled DEFAULT otherwise. Since the empty and zero values are considered false, but the logical operators short-circuit and preserve the original values of their arguments, you can achieve this with:
@(OPTION) or @(DEFAULT)