LabVIEW Idea Exchange

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

Resolve Inconsistency for Numerics

Status: New

When you drop a numeric constant on the BD, you get an I32. When you drop a Numeric Control on the FP, you get a DBL. I suggest consistency between the two, or even better, have an environment setting that allows a user-defined default data representation.

 

NumericConstantControlInconsistency.png

6 Comments
RavensFan
Knight of NI
Actually, I wish that a Numeric Constant of Double was on the palette alongside the I32. It would save a right click to change the representation. I think I would use a Double constant as often as any of the signed or unsigned integer constants.
AristosQueue (NI)
NI Employee (retired)
It's an integer so that if you type a double value into it, it automatically changes to a double.
JackDunaway
Trusted Enthusiast
Our main project mostly uses SGL's, hence the idea about default datatype.
elset191
Active Participant

Ravens, you can change it to a double by typing 0. (or 0.0 or any other number with a decimal) when you drop the constant.  Obviously this takes some time, but less than right clicking to change the representation.

 

Upon further review, AQ already said this.

Message Edited by elset191 on 09-11-2009 08:42 AM
--
Tim Elsey
Certified LabVIEW Architect
altenbach
Knight of NI

Of course that "adapt to entered data" setting is often not all that great. For example in the following example, editing the "7.5" to a "5" will flip the constant to a I32 for no good reason at all. The adaptation should be automatically suppressed if a coercion dot would result.

Message Edited by altenbach on 09-11-2009 02:33 PM
Sergey_Kolbunov
Member

I agree to the idea of having a user-defined default data representation. In 99% of cases when I drop a new Numeric Control/Indicator to the block diagram I need it as integer, so I have to right click and change representation every time.