Stephen,
Whoops, in cut and pasting the code, I missed out one of the
functions in my example. Here it is:
Code:(procedure (abCalcDouble arg1)
(times arg1 2))
SKILL is a full-featured programming language. Essentially it is LISP, although it can be written with a C-like syntax. The above examples were all written with a LISP-like syntax (that's my personal preference, but it makes no difference to how the code works)
To write it in C-like syntax, you could do:
Code:procedure(MYrms(x)
rms(x-average(x))
)
procedure(MYrmsCB()
calSpecialFunctionInput('MYrms nil)
)
procedure(MYregisterCalcFuncs()
calRegisterSpecialFunction(
list("MYrms" 'MYrmsCB)
)
)
; call the function to register the MYrms func:
MYregisterCalcFuncs()
In fact all the calculator does is build a SKILL expression - you'll see that the definition of MYrms() above uses exactly the expression you mentioned.
More information can be found on SKILL by reading the SKILL Language User Guide in cdsdoc - this is written in the style of a book on a programming language, much as you'd find in a bookshop.
Regards,
Andrew.