Selection (Conditional Expressions)

SEL

SEL(cond,x1,x2)

Returns x1 if cond is false, and x2 otherwise.

MUX

MUX(select, x0, x1, …, xN)

Returns x<select>. If select is 0, x0 is returned. If select is 1, x1 is returned and so forth. The MUX function can have an arbitrary number of parameters, but has to have at least two.

The function is overloaded for any type for x<i> and for any integer for select. The smallest common type of x<i> is used as return type.

Selection (Conditional Expressions) 1:

RESTRICTION:

The variable select must lie within the interval [0,N]. Otherwise, an out-of-bounds error is issued at runtime.