LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display format question

Solved!
Go to solution

I found this in a post from 2008.  Have not tested to confirm if this range is still applicable but it seems to be the case, based on the OP's observations. 

aputman_1-1729781475485.png

 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 11 of 18
(268 Views)

If this is not in the documentation, then it's still a bug even if it's 100% intentional.

 

And it IS in documentation. So I now agree it's technically not a bug.

 

Having just read the documentation I realised I was mentally substituting %p for %g in the code, since we use %p nearly everywhere in our code. We never use automatic formatting, and this example shows why.

 

I take it back. Not a bug, but your reference to the actual formatting is still the only useful response given in this thread.

0 Kudos
Message 12 of 18
(258 Views)
Solution
Accepted by topic author nitad54449

@altenbach wrote:

@nitad54449 wrote:

Is there a rule for what number of digits are shown as Float or Scientific when using "Automatic Format" ?

 

 

Quote from the help:
Automatic formatting
—Displays the numeric object in the format that LabVIEW determines is appropriate for the data. LabVIEW chooses either scientific notation or floating-point notation based on the number to format.


The important part of the help to quote here is:

Intaris_0-1729782798255.png

 

Message 13 of 18
(254 Views)

Thanks Intaris. Indeed, this is the point I wanted to know !

0 Kudos
Message 14 of 18
(229 Views)

I agree this is not a bug and entirely reasonable. Instead of making a long thread here, the exact behavior is easy to determine in minutes with a simple test program.

 

altenbach_0-1729796699213.png

If is clear where it switches to e-format, and before that two digits of precision are insufficient. There is a reason that the default is 6 digits here and you probably don't want to go lower.

Message 15 of 18
(219 Views)

I agree it's not a bug.. it's just that without knowing the range of swithing between F and E, it seemed weird. 

Thanks

Message 16 of 18
(212 Views)

@nitad54449 wrote:

Thanks Intaris. Indeed, this is the point I wanted to know !


Thank you, I learned through this post also.

 

We gave up on %g formatting a LONG time ago, so the reasons were no longer in the front of my mind. This post helped me remember why.

 

Always good to have a refresher from time to time.

 

The fact that the UI for setting automatic formatting gives no indication of the behaviour is.... OK. So clicking on "Help" should give clarity.... It only says that LV determines the proper formatting, you need to follow another link to "format codes" (which is the part I posted) which actually EXPLAINS the decision behind the scenes.  My take-away from this is that the text in the help should include a hyperlink to the "g" portion of the formatting codes (if we want to assume people using the simple UI are even aware that "automatic" equals "%g" formatting). OR make a mention that it uses the %g formatting and then link to the rules of that. A lot of users will not make the jump from the description of the Automatic formatting to the "format codes" hyperlink 30 lines further down the help page in a completely different paragraph.

 

Is it a big deal? no. Is it optimal? no. Could it be made easier for new users and forgetful old farts like myself, yes.

 

So while I agree it's not a bug, I think the documentation of the functionality could be improved.

Message 17 of 18
(170 Views)

@Intaris wrote:

@nitad54449 wrote:

Thanks Intaris. Indeed, this is the point I wanted to know !


Thank you, I learned through this post also.

 

We gave up on %g formatting a LONG time ago, so the reasons were no longer in the front of my mind. This post helped me remember why.

 

Always good to have a refresher from time to time.

 

The fact that the UI for setting automatic formatting gives no indication of the behaviour is.... OK. So clicking on "Help" should give clarity.... It only says that LV determines the proper formatting, you need to follow another link to "format codes" (which is the part I posted) which actually EXPLAINS the decision behind the scenes.  My take-away from this is that the text in the help should include a hyperlink to the "g" portion of the formatting codes (if we want to assume people using the simple UI are even aware that "automatic" equals "%g" formatting). OR make a mention that it uses the %g formatting and then link to the rules of that. A lot of users will not make the jump from the description of the Automatic formatting to the "format codes" hyperlink 30 lines further down the help page in a completely different paragraph.

 

Is it a big deal? no. Is it optimal? no. Could it be made easier for new users and forgetful old farts like myself, yes.

 

So while I agree it's not a bug, I think the documentation of the functionality could be improved.


I never paid much attention to this either and for the same reason.  I just either don't care or explicitly format the output.  This was actually good reading.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 18 of 18
(145 Views)