Anvil | Smiths Smiths | Register Register | Login Login |
Search:
Show links Show tools Show tree | Previous document Next document | njet.org > Anvil > Documentation > Language reference > Statements > Simple statements > Yield

Yield

A Function (or method) containing one or more yield statements is called a generator. A Yield statement is used to return values from enumeration produced by a generator function.

A Yield statement may not appear inside ``synchronized´´ or ``finally´´ or under the influence of a ``finally´´ handler.

  yield := "yield" expr-listvalues [ stmt-modifier ] ";" 
Contributes notes:
Add a note
What's new | Anvil