LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I format a large number to have comma separators?

it's 2019

Screens and graphics allow a more easy way (better readability) to display long numbers (on each side of the decimal seperator).

Numeric inputs and outputs of a modern UI should be able to group the numbers with fractions of a space (I would prefer as a general seperator).

And don't miss the scales !!

Ideas to push:

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Visual-Aides-Numeric-Separators/idc-p/3881749

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Digit-grouping-for-Numerics/idc-p/2123338

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 21 of 29
(1,853 Views)

There's some good function in .net for this that I made a test with. I can't find it quickly though.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 22 of 29
(1,847 Views)

Well. since 20 years I can use TeX to set nice tables for documents ... however, I want this in native LabVIEW on my UI including the graph scales. 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 23 of 29
(1,836 Views)

@Henrik_Volkers wrote:

it's 2019

Screens and graphics allow a more easy way (better readability) to display long numbers (on each side of the decimal seperator). 


"long numbers" (especially with a reasonably number of significant digits), should probably be displayed in SI or scientific format anyway. Much more concise.

 

Even with seperators, things will get out of hand if you need to (mis?)count the number of triplets, for example. The problem is just pushed a little bit, but still exists.

 

 

Message 24 of 29
(1,827 Views)

There's a good .net function for that, that I finally figured out (though I agree with Altenbach about the SI format).

DoubleToString.png

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 25 of 29
(1,808 Views)

@altenbach wrote:

"long numbers" (especially with a reasonably number of significant digits), should probably be displayed in SI or scientific format anyway. Much more concise.

 

Even with seperators, things will get out of hand if you need to (mis?)count the number of triplets, for example. The problem is just pushed a little bit, but still exists.


That is why my go to formats for numbers is "%0.3p" and "%#.3p" (depending on if I really want to see the trailing 0s or not).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 26 of 29
(1,793 Views)

Unless you have to deal with ppms and ppbs 😉  



That is why my go to formats for numbers is "%0.3p" and "%#.3p" (depending on if I really want to see the trailing 0s or not).


 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 27 of 29
(1,782 Views)

@Henrik_Volkers wrote:

Unless you have to deal with ppms and ppbs 😉


That would be an exception.  99.5% of the time, 3 decimal places is more than enough.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 28 of 29
(1,776 Views)

@crossrulz wrote:

@Henrik_Volkers wrote:

Unless you have to deal with ppms and ppbs 😉


That would be an exception.  99.5% of the time, 3 decimal places is more than enough.


Say for 99,5% of the applications ...

unless you work in a national metrology lab... 😄

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 29 of 29
(1,769 Views)