INFO: Clarification of fcvt() FunctionLast reviewed: September 2, 1997Article ID: Q42453 |
The information in this article applies to:
SUMMARYThis article is meant to clarify the description of the fcvt() function in the "Microsoft C Optimizing Compiler: Run-Time Library Reference," version 5.1 manual, pages 251-252. The fcvt() function converts a floating-point number to a null- terminated character string. The number of digits converted depends on the second parameter passed. This second parameter is called "count" for the remainder of this article. The function is designed to return all the digits to the left of the decimal point, and then count digits to the right. Once the string is converted, all leading zeros are removed unless the number passed was zero (see example 4 below). The string will be terminated with the "/0" character. The decimal point is not included in the string, and its position can be obtained from the third parameter (see the documentation).
MORE INFORMATIONBased on this description, the following examples apply. In all cases, count = 8. The examples are as follows:
|
Additional query words: 8.00 8.00c 9.00 9.10 10.00 10.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |