Action Specification

An action specification has the form:

action-specification:
        function-declarator dependency-list function-body

dependency-list:
        : identifier-list

The function declarator and function body are the same as those of function definition. An identifier is declared to be an action using the keywords proc or func. There is no difference between proc and func; but the user is recommended to use proc because an action usually serves as a procedure.

The dependency list is a list of comma-separated identifiers preceded by a colon.

An action is normally a procedure invoked automatically by the system when any object specified in the dependency list is changed. No parameters will be passed to the procedure; so the argument list $ is always empty when called by the system. All values returned by the actions are ignored by the system.

The order of invoking actions is controlled by the EDEN interpreter, but the user can invoke an action explicitly by giving a pair of parenthesis (a null argument list) after the action name (exactly like a procedure/function call). This is useful for debugging.

Notice that if the identifier list is omitted in the dependency list the action is just an ordinary procedure.

The use of actions (and the use of ``impure'' functions as operators in formulae) leads to procedural activity outside the user's direct control when expressions are evaluated. The user should make no assumptions about the order in which such procedural actions are performed. For instance, no two actions that can be invoked in the same time should write to the same RWV. EDEN does not provide any facility to detect or prevent such ``interference'' between actions.


[BACK] [HOME] [UP] [HELP]