This version is out of date, covering development from v9.0.0 to v9.3.0. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 Icon

Defining a function

Important note: all examples follow aTbRef naming conventions.

Defining functions

Functions are defined by the function statement:

function name(arguments){actions}

The basic syntax is comprises four parts:

A function is essentially an encapsulated set of action(s) which may take inputs—arguments—similar to the way some action code operators take input parameters. The terms 'argument', 'input' and 'parameter' may be used interchangeably, as the implied meaning is the same.

Storage of function code is discussed here.

A function can be called from anywhere, as explained here.

Examples of function syntax are given here.

Can a function code contain another complete function?

Next: Function arguments