An expression is like an algebraic expression in normal life. An expression can generally be used when any numeric or other type of value is expected. Provided the data type yielded by the expression matches the type expected there should be no problem.
For example the Circle shape expects a numeric value for the first ( radius ) parameter. So you can use a literal number, like 20, or you could use some complex expression that yields a number, e.g. "Sin(3 * x) + 45".
Components of Expressions
An expression consists of terms and operators. Each term in the expression can itself be an expression or an atomic term ( one that cannot be broken down further ).
An atomic term consists of either a literal value or a datum ( named variable or constant ). A literal value can be a compound value ( structure or array ), in which case each element of the compound can itself be an expression. so everything eventually reduces to atomic terms and operators.
There is a large set of operators. Most take numeric values as operands, but all data types have some operators.
Each operator has a fixed precedence and order in which they associate. These can be overridden using parentheses. The system is like the old "BODMAS" from school days.
The following is a summary of all the operators :-
|>= <= > <||Numeric/Enum||520||Left||Comparison|
The absolute value of the precedence is not important, just the relative values. If the precedence values are the same then the associativity rule applies.
There are some symbols that have more the one meaning, e.g. '+' and '(', the interpretation of these depend on where they appear in the expression. A term is always followed by a binary operator ( or some terminator ) so any ambiguous symbol will always be interpreted as such in those situations.
If you have done any programming most of these operators should be familiar to you. The only one invented for this language is the "structure modify" operator ( although someone else has probably come up with the same idea already ). All the operators will be covered in detail at some point in the documentation.