Expression

Basic blocks of Swan to combine flows.

An expression (expr) is built from valid identifiers representing flows, constant, sensor and combine pre-defined operators and more complex operators. The following sections list the operators, each of them having its own reference card explaining how to use it in an expression.

Basic

Identifier expressionident_expr
Atomtrue, false, INTEGER, TYPED_INTEGER, FLOAT, TYPED_FLOAT, CHAR

Combinational Operations

Binary Arithmetic +, -,*, /,mod
Unary arithmetic-
Numeric cast:>
Booleanand, or, xor,not
Relational<>,=, <, <=,>, >=
Bitwiseland, lor, lxor, lnot, lsl, lsr
Selectionif/then/else, case

Sequential Operations

Binary Operators->, pre, window
Unary Operatorspre

Operations on arrays

Operations on structures

Operator instances

operator instance application

Forward Iteration

forward