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

List:       kde-usability
Subject:    Re: idea calculator - bc and national language?
From:       Lubos Lunak <l.lunak () suse ! cz>
Date:       2004-07-26 14:29:44
Message-ID: 200407261629.44913.l.lunak () suse ! cz
[Download RAW message or body]

On Saturday 24 of July 2004 14:22, Sébastien Laoût [temporar] wrote:
> Le sam 24/07/2004   11:27, Lubos Lunak a écrit :
> > Dne čt 22. července 2004 15:18 Sébastien Laoût [temporar] napsal(a):
> > > [...]
> > > //<<
> > >    if( !KStandardDirs::findExe( "bc" ).isEmpty()) {
> > >       QString expWithPoints = exp.replace(",", ".");
> > >       cmd = QString("echo \"scale=20;%1\" | bc" ).arg(expWithPoints);
> > >    } else
> > > //>>
> > > [...]
> > > No ?
> > > A problem with that ?
> > > I search... but I find it trivial.
> > > But I'm not an expert hacker :-)
> >
> >  Nothing is trivial :). [...] It also
> > doesn't check if "," really is the separator.
>
> But what can also be "," ?
> I don't know bc (haven't it installed). Is it provide functions ?
> If yes, of course ',' would be to separate the parameters.

 I think bc has some function but it probably doesn't matter here. I just 
wanted to point out that , is a decimal point only in some locales, not in 
all.

>
> > There's no conversion the other way around.
>
> What do you mean ?
> The result is not converted ?

 Yes. If you input data with , as a decimal point, you should get it the same 
way back.

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak@suse.cz , l.lunak@kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/
_______________________________________________
kde-usability mailing list
kde-usability@kde.org
https://mail.kde.org/mailman/listinfo/kde-usability
[prev in list] [next in list] [prev in thread] [next in thread] 

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