[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Looking for (KDE) lib/class to perform calculations
From: Bo Thorsen <bo () sonofthor ! dk>
Date: 2002-03-25 9:53:15
[Download RAW message or body]
On Monday 25 March 2002 10:01, Rik Hemsley wrote:
> #if Rob Kaper
>
> > Is there a class/method/lib in KDE/Qt to perform calculations?
> >
> > Something like KCalculator::calculate(const QString expression) or
> > something that let's me do int result = calculate( "(3*%1)+40" ).(30)
> > which will return 130..
>
> Have a look at 'spirit'. It allows you to write a parser in (very
> few lines of) pure C++.
>
> The examples include a calculator which seems to be almost exactly
> what you're looking for.
Please don't. As quite a lot of people have pointed out, a calculator parser
is pretty easy to do.
Send me some description on what is needed and where it should fit in, and I
offer to make the code during the next week. The most difficult thing in
doing this will be to figure out the koscript code/api, writing the actual
parser is not a problem.
Bo.
--
Bo Thorsen | Praestevejen 4
Free software developer | 5290 Marslev
SuSE Labs | Denmark
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic