frealtoa - format REAL to ASCII
int frealtoa (r, format, dest, len, dec)
Frealtoa converts the floating point value r to an ASCII string with format, storing the result in dest: a string of len bytes. The number of bytes used in the formatted result is returned.
If there are more than 15 digits to the left of the decimal point, scientific notation of the form [-]n.n[n...]e[-]nn is forced.
If dec is a zero or positive value, it is taken as the number of decimal places to be formatted. This number overrides the number of decimal places in the format string. If the value to be converted contains fewer than dec decimal places, zeros are inserted at the end of the number. If the value contains more decimal places, the value is rounded at dec decimal places.
C/Base Reference Manual Chapter 13, "Formatting Data Values"
If an error occurs, frealtoa returns a negative number and the contents of dest are undefined. The following symbolic error codes are defined in <cbase/dtypes.h>:
FTOOBIG the formatted result is longer than the destination length,
FFORMAT format is empty or contains invalid key letters