Next: , Previous: CHP Communications, Up: CHP Statements


14.3.2 Assignments

The syntax for a variable assignment is simple:

For example, x := y assigns the value of y to x. The lvalue must refer to a scalar instance of a data type, while the rvalue may be any (nonmeta) expression. The types for lvalue and rvalue must match.

Execution: just assign the current value of the rvalue to the lvalue. Assignments are atomic, so we need not consider changing references.