LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to find number of digits from numeric control

Hi all
actually i want to multiply two n digit numbers using divide and conquer method. for this i made two numeric controls  but the problem is how can i know the number digits in numeric control. moreover how can i pad 0's in the other numeric controls. thanks
0 Kudos
Message 1 of 2
(2,958 Views)

Well, as for padding, while editing a numeric control you can go to Format and precision... subpanel and set the desired panning value: if the number is smallest that this size it will pannel with 0s to the left. Be careful: number of digits includes digits to the right of decimal separator. Remember that padding is only a representation issue: control value will remain the same even if padded to several digits.

The size of the control value can be obtained formatting it into a string and getting its value but I don't know how much this will impact on your algorithm (I suppose you are in look for efficiency...).



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(2,953 Views)