LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

New LV2010 Feature: DBL Numeric Constant

Solved!
Go to solution

Darren,

 

Thanks for adding the double numeric constant.  It is something that feels like always should have been there.  I had heard about the 0.0 trick to cause the integer to change to double.  But even that was never fool proof.  Unless you unchecked Adapt to data type, if you later changed the value of the constant such as making it 1, it would revert to an integer unless you again entered it as 1.0.  So that trick always had the risk of somewhat changing some aspect of the code (wire datatype) that you may not have intended to change if you weren't paying attention.

 

I also like how scripting is becoming a bit more endorsed by NI.  I haven't used it much, but I have done a few VI's and used a few right click frameworks to automate some tasks.  Kind of like creating macros to automate routine stuff in Excel, scripting allows us to automate some routine activities during LabVIEW coding sessions.

0 Kudos
Message 11 of 13
(808 Views)

Darren, I would have like the DBL numeric constants NOT to be set to adapt to entered data. Else we later type a 2 and it turns blue, introducing a coercion dot. Now that we have the orange constant, maybe the integer should also no longer adapt to entered data by default.

 

Also, the palette icon should have a decimal point somewhere for distinction ;).

Message 12 of 13
(785 Views)

 


@altenbach wrote:

Darren, I would have like the DBL numeric constants NOT to be set to adapt to entered data. Else we later type a 2 and it turns blue, introducing a coercion dot. Now that we have the orange constant, maybe the integer should also no longer adapt to entered data by default.

 

Also, the palette icon should have a decimal point somewhere for distinction ;).


 

Completely agree with DBL not adapting to type.  Completely disagree with changing current behavior of the integer constant. 

 

I never knew that it would change back.  Years of dealing with text languages and older versions of the Formula Node has taught me to always put .0 on floating point values lest they have ways of being coerced at inopportune moments to integers. 

 

It would be cool if I could type i and get a Complex Constant.  Now that I have this little guy I am happy though.

 

 

Message 13 of 13
(778 Views)