LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Format into string : Minimum decimal digits

Solved!
Go to solution
Solution
Accepted by topic author i.ayestaran

There doesn't appear to be a format string that will accomplish what you want, but this should.

 

edit: the way it's written, Min Precision of 0 or less will give you this behavior... 123 --> 123. (decimal on the end). That can be fixed easily enough though, of course.

 

Redhawk92_0-1593699004584.png

 

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 11 of 15
(1,341 Views)

Really nice piece of code, many thanks!

0 Kudos
Message 12 of 15
(1,329 Views)

I would recommend to find a solution that does not depend on the localized decimal delimiter. (, or .)

0 Kudos
Message 13 of 15
(1,314 Views)

@altenbach wrote:

I would recommend to find a solution that does not depend on the localized decimal delimiter. (, or .)


Just add another control for the delimiter, maybe an enum with those two possible values and (.) as the default. Or some dynamic way of getting the currently used delimiter from the system. But yeah, currently it definitely won't work if (.) isn't the delimiter.

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 14 of 15
(1,306 Views)

Try this. Should not depend on localized decimal delimiter.

 

altenbach_0-1593704839754.png

 

 

(It could be made into a malleable VI so it accepts scalars and arrays with any number of dimensions. :))

0 Kudos
Message 15 of 15
(1,299 Views)