devxlogo

String to Float

String to Float

Question:

How do I add two label values together and submit the answer to another label?

Label19.Caption := FloatToStrF(Table1Standard.AsFloat,ffCurrency,15,2)Label20.Caption := FloatToStrF(Table1Zero.AsFloat,ffCurrency,15,2)Label21.Caption := StrToFloat(?????????

Answer:

This is one of those things that you’ll kick yourself for not seeing right away. The answer is:

FloatToStr(MyFloatValue);

devx-admin

Share the Post: