activate when

Defines multiple flows depending on a pattern.

Syntax

activate_when: activate LUID?  when expr match when_branch+
where:
  1. the selection is done on a pattern:
    when_branch:  | pattern :  (equation; or scope)
  2. or on a variant type where a local variable is defined to represent the contents of the variant:
    when_branch: | path { ID } :  (equation; or scope)

Constraints

  1. Type

    1. expr in condition and pattern have the same type.
    2. expr in condition and path {ID} have the same type.
  2. Causality

    The defined flows depend instantaneously on the condition

  3. Initialization

    The condition must have its first value defined