ECVT(3C) COMMAND REFERENCE ECVT(3C)
NAME
ecvt, fcvt, gcvt - output conversion
SYNOPSIS
char *ecvt(value, ndigit, decpt, sign)
double value;
int ndigit, *decpt, *sign;
char *fcvt(value, ndigit, decpt, sign)
double value;
int ndigit, *decpt, *sign;
char *gcvt(value, ndigit, buf)
double value;
char *buf;
DESCRIPTION
ecvt converts the value to a null-terminated string of
ndigit ASCII digits and returns a pointer thereto. The
position of the decimal point relative to the beginning of
the string is stored indirectly through decpt (negative
means to the left of the returned digits). If the sign of
the result is negative, the word pointed to by sign is
nonzero; otherwise it is zero. The low-order digit is
rounded.
fcvt is identical to ecvt, except that the correct digit has
been rounded for FORTRAN F-format output of the number of
digits specified by ndigits.
gcvt converts the value to a null-terminated ASCII string in
buf and returns a pointer to buf. It attempts to produce
ndigit significant digits in FORTRAN F-format if possible,
otherwise E-format, and get it ready for printing. Trailing
zeros may be suppressed.
CAVEATS
The return values point to static data whose content is
overwritten by each call.
ecvt has an internal static buffer size of 80 characters.
Writing more than 80 characters (including a terminating
null, if any) will overwrite the internal data and may abort
the function.
SEE ALSO
printf(3s).
Printed 3/13/89 1
%%index%%
na:264,88;
sy:352,2213;
de:2565,1338;
ca:3903,422;
se:4325,117;
%%index%%000000000097