LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

flatten to string with significant digits

I was using NumberToFractionalString to convert a double to a string, but I was specifying a width of 5 and precision of 2.  Now, however, I want to FlattenToString the double.  I'm not sure if I need tp specify any precision for my application, but if I wanted to maintain the 5::2 using the FlattenToString, is there a way to specify that?
0 Kudos
Message 1 of 5
(2,472 Views)

Flattening to a string is not a formatting operation, but something that retains all original bits in the DBL. It has no concept of cosmetic formatting terms.

 

Do you simply want to round your values to two decimal digits? Be aware that this is not possible when retaining binary representation.

 

 

0 Kudos
Message 2 of 5
(2,465 Views)

Flatten To String takes the binary representation of anything and converts it to a serialized binary string. It's not used to format things for human consumption.

 

For formatting, most of us use Format into String for all number-to-string conversions. It takes the usual sprintf codes ("%5.2f" etc) plus some nice extensions unique to LabView, like %g.

0 Kudos
Message 3 of 5
(2,461 Views)

Rob,

 

Your user icon shows up as a red X.  Where your .jpg file is stored, is not accessible to other users.

 

Attach your icon to a message in this thread, then have you profile point to that location for your user icon.

Message 4 of 5
(2,437 Views)
I'd moved to linux-based hosting provider, and URLs are case-sensitive on linux. Should be fixed.
0 Kudos
Message 5 of 5
(2,430 Views)