Tinderbox v9 Icon

function fName([argumentsList]){code}

Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Last Altered: 

Operator Uses Loop Variable Argument: 

 Function  [other Function type actions]

 Document  [operators of similar scope]

 Data manipulation  [other Data manipulation operators]



 [More on loop variable arguments]

function fName([argumentsList]){code}

The function operator defines a user-defined function. A function is called by its user-defined name (here fName) and defined as described in detail here.

Any optional input arguments, passed asa comma-delimited argumentsList defined for the function, are available within the function. Each argument's received values is retrievable anywhere within the function via an argument's name as defined within the function, in the same manner as a loop variable.

As functions are more complex than other operators, their syntax and use is described in Functions and its sub-notes.

From v9.5.0, function declarations may optionally specify the type of their arguments. For example,

	function fAppendFoo(iList:list){
		return (iList+"foo");

declares that argument values passed to the function fAppend() will be treated as lists within the function.