I have the following code:
mValue = NumberFormat2(TextField1.Text + StepValue, 1, mDecimals, mDecimals, False)
where mValue is Double, StepValue and mDecimals are integers defined in the designer...
Given a mDecimals of value 2, shouldn't this code convert a number like 1.1 to a string like "1.10"??
I ask because all I get is the same decimal places as the mathematical value (i.e 1 + 0.1 = 1.1) , no mater how I format the number
[EDIT]
Seems like using NumberFormat on a variable has a different behaviour than using it directly on a string like a TextField.text, where it works perfect
mValue = NumberFormat2(TextField1.Text + StepValue, 1, mDecimals, mDecimals, False)
where mValue is Double, StepValue and mDecimals are integers defined in the designer...
Given a mDecimals of value 2, shouldn't this code convert a number like 1.1 to a string like "1.10"??
I ask because all I get is the same decimal places as the mathematical value (i.e 1 + 0.1 = 1.1) , no mater how I format the number
[EDIT]
Seems like using NumberFormat on a variable has a different behaviour than using it directly on a string like a TextField.text, where it works perfect
Last edited: