LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Format into String bug

Format into String function does not properly interpret format strings that mix precision (%.#) and significant digits (%_#) specifiers. For example,
 
%.2f\s%_2f will be interpreted correctly, however, using %_2f\s%.2f will format BOTH numbers into strings with 2 significant digits.
 
LV help does state that "you cannot use precision and significant digits together in a single percent code", however, we are talking about 2 % code instances here.
 
Certainly an circumventable problem but an inconvenience nonetheless.
 
Zador
0 Kudos
Message 1 of 5
(3,738 Views)
I agree, this looks like a bug. The result is not as expected.
0 Kudos
Message 2 of 5
(3,720 Views)
Play with it a bit and it gets even stranger. The first underscore in a format code appears to cause all subsequent periods in format codes to be interpretted as underscores.
 
Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 5
(3,704 Views)
Yep,
 
I have filed a corrective action request to have this issue addressed.
 
Thank you!
 
JLS
Best,
JLS
Sixclear
0 Kudos
Message 4 of 5
(3,675 Views)

This was reported to R&D (# 3P7BIJSQ) for further investigation.  A possible workaround would be to use multiple Format Into String functions and concatenate the results.

Thanks for the feedback!

Travis H.
LabVIEW R&D
National Instruments
Message 5 of 5
(3,486 Views)