[Gambas-user] Format$ thousand separator

Benoit Minisini gambas at ...1...
Wed Dec 19 15:44:11 CET 2007


On mercredi 19 décembre 2007, Benoit Minisini wrote:
> On mercredi 19 décembre 2007, Epíleg wrote:
> > Hello,
> >
> > I do not get the thousand separator whit the «format$» function, some
> > examples:
> >
> >
> > PRINT Format$(1000000, "$$,#.00")  =>  EUR 1 000 000,00
> >
> > PRINT Format$(1000000, "$,#.00")  =>  € 1 000 000,00
> >
> > PRINT Format$(1000000, ",#.00")  =>  1000000,00
> >
> >
> > What I'm doing wrong?
> >
> > These tests are done in a Ubuntu Gutsy (7.10) with «ca_ES.UTF-8» locale
> >
> > Regards,
> > Epíleg.
>
> Apparently, this is a bug!

The last revision now takes thousand separators into account. 

But be careful that in the GNU locales, many languages have thousand 
separators only for currencies.

So, when a locale does not have any thousands separator, a space is used, and 
the value is splitted each three digits. Maybe this is a bad idea that will 
be removed in the future!

Regards,

-- 
Benoit Minisini




More information about the User mailing list