|Top Previous Next|
Ftostr function offers much more control over the format of the output string compared to similar functions found on other systems. For starters, you can select whether you want to see mantissa/exponent, "regular" format, or let the function decide which format to use. Additionally, you control the rounding i.e. get to choose how many digits should be displayed — and this influences the representation both of the fractional and integer part of the value.
Examples below illustrate what you can do with ftostr. The ftostr has a counterpart — fstr — which is invoked implicitly whenever you assign a real to a string (string=real). Fstr is just like ftostr but mode and rnd parameters are fixed at 0- FTOSTR_MODE_AUTO and "maximum number of digits possible".