Normally a custom function is executed in a precise order, working line by line down the column from the cell containing the FUNCTION function which marked its beginning. As each cell is evaluated, the result is stored in the cell and this can be referred to by references in other cells.
Fireworkz includes some features for use in custom functions which are more like a programming language, and control the order in which commands are executed or formulae evaluated. These are the custom function control statements.
Most of these control statements must appear in their own cell (with their parameters if appropriate) but BREAK
, CONTINUE
, RESULT
and GOTO
can appear in the parameters to other control statements, for example:
IF(C <= D, RESULT(C))