This is an old revision of the document!
Exec statement
The exec statement is used to assign a value of an expression to a parameter. The statement is the default one, thus the exec keyword can be omitted. The expression can take a form of:
- literal value,
- parameter,
- Haskell expression (probably with some Haskell functions).
The exec statement is a single-step statement.
exec parameter = expression; parameter = expression;
Listing 1. Exec statement syntax
x = 7; exec x = 7; x = x + 1; x = sqrt x + 2;
Listing 2. Exec statement examples