Page 1 of 1

FloatToString not working

Posted: Sat Jan 24, 2026 2:14 pm
by RGV250
Hi,
I have made a simple test example as the FloatToString function does not appear to work. This is in V11 but could be other versions?
It has an incrementing value but only shows the integer portion.
FloatToStringWebTest.fcweb
(12.91 KiB) Downloaded 9 times
Regards,
Bob

Re: FloatToString not working

Posted: Sat Jan 24, 2026 2:33 pm
by chipfryer27
Hi Bob

You haven't specified any precision so no decimal places are included.

FloatToString(x,3) would give x to three decimal places.

Regards

Re: FloatToString not working

Posted: Sat Jan 24, 2026 3:02 pm
by RGV250
Hi,
Thanks for that, that will teach me to assume. On another compiler I use if you do not specify it shows the whole number and if a value is specified it limits the decimal places.

Bob