On Tue, 22 May 2001, Hubert Figuiere wrote:
> According to ha shao <[EMAIL PROTECTED]>:
> >
> > Cann't this be done with the perl plugin? I think perl can do
> > more powerful math too. Also better extension and load on demand.
>
>
> Given the size of perl, it would be like calling a buldozer instead
> of having a hammer in the toolbox, just for a nail.
>
All I want is an expression evaluator that works on just numbers.
There are plenty of examples of this in textbooks on C code. There have
got to be tons of these floating around the internet somewhere. I'm sure
it can be coded in 100 lines of C. I just don't want to do it. I want to
steal someone else's code.
The ideal function would be passed an ascii string of numbers and
*/+-(). It would return the result and an error indicator. If the
expression did not compute for any reason, the "Calculate Value" item in
the context menu is not drawn.
Cheers
Martin