Seppo Mustonen : Programming Survo in C

Functions in library SURVO.LIB

fnconv
Summary

int fnconv(number,length,string)
double number;     /* number to be converted */
int length;        /* length of the result */
char *string;      /* string result */
Description

The fnconv function converts the digits of the given number to a nullterminated character string and stores the result in string. The format of the result is selected so that the length of string will be length. Exceptionally large numbers are converted to a floating point (exponent) form and the length of string may then exceed length.

Return Value

There is no return value.

See Also

fconv

Example

double x=3.14159265;
char result[32];
fnconv(x,7,result); /* result=" 3.1416" */


Front page of Survo C libraries