INtime SDK Help
gcvt

Converts a double value to a string of significant digits, and places them in a specified location.

#include <stdlib.h>

char *gcvt (double value, int digits, char *buffer);

Parameters

value
Value to convert.
digits
Number of significant digits stored.
buffer
Storage location for result. Should be large enough to accommodate the converted value plus a terminating null character \0, which is automatically appended.

Remarks

There is no provision for overflow.

gcvt tries to produce significant digits in decimal format. If this is not possible, it produces them in exponential format. Trailing zeros may be suppressed in the conversion.

Return Values

A pointer to the string.
Success.
No error return.
Failure.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/stdlib.h stdlib.h clib.lib

See Also

atof, atoi, atol, ecvt, fcvt