LabVIEW Public Beta Program in 2023

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug Format Into String Display Style Issue

I believe this bug exists in other versions of LabVIEW, but still it is a bug and I thought I'd mention it while this beta is open.

 

If you drop a format into string function, then wire a string constant to the Format String, which uses a \ style, then the values in it won't be preserved, if you use the Edit String Format window.  Here is an example:

Capture.PNG

Here I have two inputs for a numeric and string, with a tab between them.  If I right click the format into string and go to Edit Format String, and then check Use Minimum field width of 0 on the numeric, I end up with this:

Result.PNG

Here it added an additional \ which is an escape character meaning I no longer have a tab between the inputs.  The Edit Format String dialog should not add this additional character.

Message 1 of 4
(1,015 Views)

I'm not sure this is actually a bug.  Your two strings result in the same output.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 4
(987 Views)

I'm very confused, but you are right.  This must be some weird thing with the format into string function behaving differently then I expected.  If the normal display shows "\t" I expect it to display a "\t" not a tab.

Message 3 of 4
(982 Views)

@Hooovahh wrote:

I'm very confused, but you are right.  This must be some weird thing with the format into string function behaving differently then I expected.  If the normal display shows "\t" I expect it to display a "\t" not a tab.


Nope. The Format into String function had this since a long time. I considered it more a feature than a bug, trying to work for people even if they do not know about backslash code display modes.

 

Yes it is kind of inconsistent but I have not yet come across a case where I would have needed the literal backslash here.

Rolf Kalbermatter
My Blog
Message 4 of 4
(906 Views)