10-09-2008 07:07 AM
How can I display long numbers in indicators and/or controls using 1000 separators?
e.g. 9'000'000'000 instead of 9000000000
PS: Using Labview 7.1
10-09-2008 07:51 AM
10-09-2008 08:07 AM
But this is quite tedious to do. I can hardly believe that i'm the only who thinks that this should be automatically implented.
Thanks anyway.
10-09-2008 08:11 AM
UMü wrote:But this is quite tedious to do.
Not if you write a Vi function to do it for you! Number and seperator character as inputs, string as output.
10-09-2008 08:34 AM - edited 10-09-2008 08:35 AM
here's one way to do it for I32 numbers. It can be extended for other types.
Dave
10-09-2008 09:10 AM
10-09-2008 10:59 AM
I agree that having the ability to show a thousands separator in numeric controls and indicators would be a good thing. It would have to be built into the display format options of the control. I believe I even put in a product suggestion for it one time. I would recommend that you file a product suggestion for this as well. Hopefully if enough people ask, we will eventually get that option.
I imagine this would be something that is based off the operating system as default, and use other characters if desired. I had never seen an apostrophe used before as a thousands separator, but if that's what you want ....
Likewise, to me, a comma is the normal thousands separator, but some of those European countries like to mix it up with the decimal point.
One other property that would need to be defined is whether you use the separator if the number is over a thousand but less than ten thousand. For example, for 1 million 1,000,000 would look right and be easier to read than 1000000.
For over ten thousand a number like 33,123 would look right as opposed to 33123. If it was under ten thousand, you could have 5000 or 5,000. I would say either of these would be equally good.
To go another step further, would there be a desire to group fractional numbers so that the digits after the decimal point are grouped in 3's, perhaps with a space. For example, 0.000 001 245would be an easier to read format than 0.000001245
10-09-2008 11:07 AM