** Next:** Objects
** Up:** Expression evaluator
** Previous:** Functions
** Contents**
** Index**

##

User defined functions

It is possible to define numerical functions by formulas, using the command
`functdef` :

- interpcom -> functdef ff(X,Y,Z) X*X+Y*Y-sin(Z)

defines a function called `ff` with 3 variables.
It is possible to use up to 10 variables.
Their names need not to be `X,Y,Z..` as in the above
example. For instance we could use

- interpcom -> functdef ff(AB,CD,ZZ) AB*AB+CD*CD-sin(ZZ)

It is then possible to use the function inside numerical expressions.

It is possible to use such functions into others :

- interpcom -> functdef G(A,B) A+ff(B,A,-A*B)

The command `listfunc` gives the list of the user defined functions
(cf. 11).

There is no command to destroy user defined numerical functions, but it is
possible to give a new definition of a function (the old formula will then
be erased in this case).

2009-11-12