LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you read the number of digits a number has.


@StevenD wrote:

Can I ask what that function is?


Yes, I was intentionally more obscure than needed (so people like you occasionally learn something new 😄 ). Here's the same with less code.

 

altenbach_0-1650400351174.png

 

Message 11 of 14
(686 Views)

Hi;

you need to better specify the type of number.

based on the luck of information , you find attached an example that could help solve your problem.

 

you could count the number of digit befor , after the dots ( the input control type : string ).

 

Emna20_0-1650401976198.png

 

 

0 Kudos
Message 12 of 14
(686 Views)

optimize.png

Let's not forget, any good programmer optimizes their code. (Some limitations may exist)

 

0 Kudos
Message 13 of 14
(671 Views)

optimize_2.png

Maximum optimization achieved

 

0 Kudos
Message 14 of 14
(662 Views)