Has anyone ever written a function parser to do simple arithmetic? (obviously + - * / ^, maybe Sqr, log, ln, sin, cos, tan etc.)

It would have to handle nested parentheses and recognise numbers as well as variables.

(e.g. have a list of assignable variables like a-z, and then be able to type and evaluate a string such as:

((a+b)^c)*2.6 + 1

)

I've tried it before (in FORTRAN of all things) and its pretty hard....

Just curious...


Dan