Function
Expression
Returns the address of the given event handler, or defines a lambda expression.
Syntax
Operator construct
Function procedure_name
Expression construct
Function ( [ parameter_list ] ) expression
Block construct
Function [ ( [ parameter_list ] ) ]
statements
End [ Function ]
Parts
procedure_name
- The name of an event handler.
parameter_list
- Mandatory in the expression construct.
- Optional in the block construct.
- Zero or more declarators with a comma between each, all between parentheses.
expression
- Mandatory expression. The type of the expression is the return type of the procedure.
statements
- Mandatory one or more statements.
One or more of the statements must be
Return
. End
- Completes the expression.
You can also use
End Function
. You can make one of these mandatory with the directive@Option End
. See @Option Directive for more information.
Instructions
Operator construct
The procedure procedure_name
must have the clause Handles
.
You use an element of the event type to store the address returned by Function
.
The element can be a variable or procedure parameter, or a value returned by a function or property.
Lambda constructs
TODO
Examples
TODO