LabWindows/CVI Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Wolfgang

'+' sign in numeric controls

As suggested about two years ago (http://forums.ni.com/t5/LabWindows-CVI/Is-it-possible-to-have-an-explicit-sign-in-numeric-controls/m...) I am still looking for a possibility to explicitly show the positive sign of a numeric value in numeric controls, i.e. the control should display '+6.789' instead of '6.789'.

 

Phrased differently I would like to have one more attribute 'SHOW_POSITIVE_SIGN' that could be set to

 

0: don't show the plus sign, i.e. display numbers as is implemented now, default

1: show plus sign for positive numbers

2: show plus sign for positive numbers and zero

 

 

4 Comments
menchar
Active Participant

And while Wolfgang's on the topic,  how about allowing a default value of "not a number" (NaN) for numeric controls with a floating point type?

 

NaN is specific to the IEEE flt pt spec but I is CVI supported on any non IEEE flt pt platform?

 

NaN is very good for indicating a "no measurement" or impossible measurement value without using some additional context to let the user know he / she's not looking at a good value.

 

In the old days we used 'funny numbers" (e.g. a negative value for time, power" to flag this, but NaN is perfect for it.

 

Without the control NaN default, you have to be sure and hack it in at startup or whenever you default the control, something of a needless hassle.

 

And if NaN works, then how about +Infinity, -Infinity and some of the other non-numeric values supported by IEEE flt pt?

 

It would be nice if NI would more fully incorporate IEEE flt pt into CVI.  After all, it's hard to find a CVI app that doesn't use flt pt.

LuisG
NI Employee (retired)
Status changed to: In Development
 
Laura F.
Active Participant
Status changed to: New
prior status deleted, setting to default
LuisG
NI Employee (retired)
Status changed to: Under Consideration