04-11-2005 05:54 PM
03-30-2006 08:08 AM
07-29-2015 07:26 PM
@LiamK wrote:
Hey guys, interesting discussion, here's my own two cents, i think it works for all situations. Let me know!Liam
Despite 9 years passing and many requests to NI to build comma separation into indicators themselves (such as this), your solution remains the best way to do it. Nice job making it so streamlined.
I have one question. Can you explain what the purpose of this part of the pattern is? I cannot find any clues in labview's help.
[~\2E\2C]
I replaced it wth this and it still works, as far as I can tell.
[~.]
Thanks,
Mike
07-29-2015 08:23 PM
MarredCheese wrote:[~\2E\2C]
2E is the period and 2C is the comma. These might be special characters for regular expressions, therefore you will need to go by their hex value. The comma is often used as the decimal separator instead of the period in some countries (like Germany).
07-30-2015 08:15 AM
@crossrulz wrote:
MarredCheese wrote:[~\2E\2C]
2E is the period and 2C is the comma. These might be special characters for regular expressions, therefore you will need to go by their hex value. The comma is often used as the decimal separator instead of the period in some countries (like Germany).
Oh, ok. Thanks!
I attached a minorly updated version. I changed that part of the string to [~,.] since it's more readable. I also made it neater, gave it an icon, made precision into an input, and wired up the connector pane so it can be used as a subVI.
12-04-2015 12:21 AM
Very interesting posting.
Can somebody convert the last example for LV2012?
12-04-2015 01:56 AM
01-12-2019 10:07 AM
Isn't there a Number to string format (%9.3f) style of conversion? Your VI inserts a comma every 3 digits, but it is also putting a comma at the beginning, Example:
186282.396 = ,186,282.396
01-12-2019 10:31 AM
That VI is much better, however it keeps trimming the decimal numbers to 2 digits, How do I control that. You also know that it is also proper to group digits in 3 digit groups with comma's as well. So if I have a long decimal number like 3.1415926 it should read 3.141,592,6
01-12-2019 11:55 AM
@emw129 wrote:
That VI is much better, however it keeps trimming the decimal numbers to 2 digits, How do I control that. You also know that it is also proper to group digits in 3 digit groups with comma's as well. So if I have a long decimal number like 3.1415926 it should read 3.141,592,6
Which VI's are you referring to in your last 2 messages? When you reply to an older message you should add that message using the quote button so we know what you are talking about.
But JB's VI in message 17 seems to work properly.
And no it is not proper to put commas in the decimal portion of the number. That is something I've never seen before.
But I did come across another idea in the Idea Exchange, a duplicate of the one I posted on your other thread, where Henrik Volkers posted a VI that did to a separator in the decimal portion. He defaulted his to a space rather than a comma. But that is easy to change and seemd to work.