LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

comma separator for large numbers, how to?

Using numeric indicators, is it possible to display large numbers as comma separated every 3 digits?

Example: 123456.789 -----> 123,456.789

This is a long standing request (for instance see this and that) but I am unable to figure out how the advanced format specifier is supposed (or not) to help us do that.

Message 1 of 26
(11,626 Views)

I see more problems with regional settings at the horizon...

Make your own number to string conversion routine!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 26
(11,620 Views)

I don't want to use a string intermediate. As a matter of fact, I don't want to have to do anything more than select a numeric display mode that reads "show comma-separated thousands".

I'd argue that I may want options to replace the comma by a slight space and have the same option for hexadecimal, octal and binary representations.

0 Kudos
Message 3 of 26
(11,616 Views)

Hi X,

 

again regional settings problems: I would call that "dot separated thousands" - or maybe "apostrophe separated thousands"...

 

I usually have to handle measurement data with just 16bit resolution (or 4.5 decimal digits), so I don't need such separation options. For me automatic formatting is ok.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 26
(11,605 Views)

You might want to use a X-Control to do this. Display wise it would be a string but it's actual data type would be a number.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 5 of 26
(11,602 Views)

Hi Mark,

 

such a Xcontrol came to my mind too...

 

@X

I would rather like to see all regional settings problems (like for timestamps) solved before introducing another potential bugs (with even more options regarding it's worldwide usage as my naming above should note) into standard indicators...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 26
(11,596 Views)

OK, message received. These are all good suggestions/objections/remarks, but my point was to verify that I was not missing an obvious solution.

When I say; "I don't want to use a string", it is because I have a hard time believing that I am the only one challenged by things like that:

 

ScreenHunter_001.jpg

 

Are these 3 millions + photons or 36 millions?

Heck, check Microsoft calculator, it has a "Digit grouping" option in its "View" menu!

In other words, it is rather common practice to help your user entering or reading numerical outputs using this kind of display. Are you suggesting I should do that for arrays of numerics too if I want to drop a probe on my diagram? Or cluster containing numerics? I did not think so.

 

Off I am to the Idea Exchange Forum...

0 Kudos
Message 7 of 26
(11,591 Views)

Suggestion posted here (for the objectors, but also for the supporters).

0 Kudos
Message 8 of 26
(11,586 Views)

@X. wrote:

Suggestion posted here (for the objectors, but also for the supporters).


I'll kudo your suggestion but if you need something right away I think the X-Control would be your best effort. Even if your idea is accepted the earliest you would see it would be LV 2013.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 9 of 26
(11,581 Views)

It turns out that the idea had already been submitted a couple years ago (unsurprisingly, after all the threads I quoted above).

0 Kudos
Message 10 of 26
(11,558 Views)