Next: , Previous: Result, Up: Statements



6.11.13 The return Statement

In a subrule, the return statement is of the following form:

     return expr;

The value of expr is returned to the rule that invoked this subrule and the subrule execution is finished.

In a pruning rule, the return statement is of the same form. Here, expr must be a list a list of the symbols yes and/or no. Each state in the feature structure list, which is the pruning rule parameter, corresponds to a symbol in the result list. If the symbol is yes, the corresponding state is preserved. If the symbol is no, the state is abandoned.