func …{return x i }

Read(892) Label: define, function block,

Description:

Define a function block.

Syntax:

func

{return xi}

Note:

The function defines a function block, which may or may not return a result after computation. The function block (subroutine) begins with the starting characters func and covers a cell range where the master cell is the one holding the func. The return statement is used to return the function's result and terminate the execution of the function block. The subroutine will by default return the value of the last calculation cell if no return statement appears during execution.

Return value:

The result of the function block.

Example:

 

A

B

 

1

func

 

Define a subroutine where the parameter passed in is a sequence and that returns the sum of members of the sequence.

2

 

return A1.sum()

Related function:

func()