This version is out of date, covering development from v9.5.0 to v9.7.3. 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 arguments. The terms 'argument', 'input' and 'argument' 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