[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:       Rik Hemsley <rik () kde ! org>
Date:       2002-03-26 13:21:48
[Download RAW message or body]

#if Bo Thorsen
> 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.

Please don't ... use some existing software specifically designed for
this purpose ? Hmm ? NIH ?

Rik

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic