Properly formatted large numbers

Michael Lew michaell at unimelb.edu.au
Tue Feb 9 22:17:58 EST 2010


Dear Listers

I'm working on some statistical simulations and regularly get output numbers
with anything from 1 to 7 digits. They are hard to read when they don't have
the conventional commas separating the thousands and millions. I've written
a simple function that does the comma formatting for me but it mucks up
sorting. Of course. (I'm using a datagrid to display the results and live
sorting is really handy.)

Does anyone have an easy way to deal with this? I'm tempted to use a fixed
pitch font so that larger numbers always look longer, but that would be a
kludgey workaround.

(I note that in OSX the Finder puts separators in the correct places in
large numbers using the settings of the International System Preferences.)

Regards,
Michael
-- 
Michael J Lew
Senior Lecturer
Department of Pharmacology
email: michaell at unimelb.edu.au
phone: +61 3 8344 7812




More information about the Use-livecode mailing list