[Glass] Printing numbers

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Glass] Printing numbers

GLASS mailing list
Hi guys,

I have quite some reports that print several numbers. Until now we were using the default #greaseString. However, we now need to be able to start printing nicer and customizable. For example, I may want to put a comma every 3 numbers and dots for the decimals. And choose how many decimals. And maybe also choose to use scientific notation, etc....

Also, I need this for both, Pharo and GemStone. I wish I don't have to start building yet again my own number formatting library... so.. is there something available I could take a look?

Thanks in advance,  

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: [Glass] Printing numbers

GLASS mailing list
OK...Grease could be a start...

(GRNumberPrinter new
            separator: $,;
            precision: 2; yourself)  print: 12345678

On Tue, Feb 24, 2015 at 4:55 PM, Mariano Martinez Peck <[hidden email]> wrote:
Hi guys,

I have quite some reports that print several numbers. Until now we were using the default #greaseString. However, we now need to be able to start printing nicer and customizable. For example, I may want to put a comma every 3 numbers and dots for the decimals. And choose how many decimals. And maybe also choose to use scientific notation, etc....

Also, I need this for both, Pharo and GemStone. I wish I don't have to start building yet again my own number formatting library... so.. is there something available I could take a look?

Thanks in advance,  



--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass