HP 3000 Manuals

gcvt [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation


HP C/iX Library Reference Manual

gcvt 

Converts floating-point numbers to strings.

Syntax 

     char *gcvt (double value, int ndigit, char *buf);

Parameters 

value         The floating-point number to be converted to a character
              string.

ndigit        The number of digits to convert.

buf           A pointer to a character string containing the numeric
              string to be formatted and to which the resulting formatted
              character string is returned.

Return Values 

x             A pointer to a character array containing the resulting
              numeric character string (the same as buf).

Description 

The gcvt function converts the floating-point number in value into a
signed numeric character string.  It attempts to produce ndigit 
significant digits in FORTRAN F-format if possible; otherwise, E-format
is used.  A minus sign or decimal point is included as part of the
returned string.  Trailing zeros are suppressed.

See Also 

ecvt(), fcvt()



MPE/iX 5.0 Documentation