Converts a decimal value to a string having a specified format.
Syntax
int rfmtdec(dec_t *dec, char *format, char *outbuf);
- dec is a pointer to the decimal value to format.
- format is a pointer to a character buffer that contains the formatting mask to
use.
- outbuf is a pointer to a character buffer that receives the resulting formatted
string.
Returns
Table 1. Return codes
Code |
Description |
0 |
The conversion was successful. |
<0 |
The conversion failed. |
-1211 |
The program ran out of memory
(memory-allocation error). |
-1217 |
The format string is too large. |