Anvil | Smiths Smiths | Register Register | Login Login |
Search:
Show links Show tools Show tree | Previous document Next document | njet.org > Anvil > Documentation > Language reference > Expressions > Primaries > Inline functions

Inline functions

Inline function expression yields handle of type ``anvil.runtime.Function´´ to anonymous function. This function has access to enclosing scopes, including enclosing functions. Parameters are placed between vertical bars (|), followed by list of statements. If parameter list is empty boolen or operator (||) can be used.

  arguments        := [ argument ( "," argument )* ] [ ".." symbol ] 
  argument         := symbol [ = expr ] 
  inline-function := "{" "|" arguments "|" statement * "}" 
  inline-function := "{" "||" statement * "}" 
See also  | Primaries  | Calls  | New operator  | Method invokes  | Grammar  | Foreach iterator
Contributes notes:
Add a note
What's new | Anvil