Re: right-click to do calculations Non-member submission from [pod@sapienagents.net]]


Subject: Re: right-click to do calculations Non-member submission from [pod@sapienagents.net]]
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Tue May 22 2001 - 07:41:51 CDT


On Tue, 22 May 2001, Hubert Figuiere wrote:

> According to ha shao <hashao@chinese.com>:
> >
> > 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
  



This archive was generated by hypermail 2b25 : Sat May 26 2001 - 03:51:06 CDT