ecvtbuf man page on Cygwin

Man page or keyword search:  
man Server   22533 pages
apropos Keyword Search (all sections)
Output format
Cygwin logo
[printable version]

ECVTBUF(3)			    NEWLIB			    ECVTBUF(3)

NAME
       2.15 `ecvtbuf', `fcvtbuf'--double or float to string

SYNOPSIS
	    #include <stdio.h>

	    char *ecvtbuf(double VAL, int CHARS, int *DECPT,
		int *SGN, char *BUF);

	    char *fcvtbuf(double VAL, int DECIMALS, int *DECPT,
		int *SGN, char *BUF);

DESCRIPTION
       `ecvtbuf'  and  `fcvtbuf'  produce  (null-terminated) strings of digits
       representating the `double' number VAL.

	  The only difference between `ecvtbuf' and `fcvtbuf' is the interpre‐
       tation  of  the second argument (CHARS or DECIMALS). For `ecvtbuf', the
       second argument CHARS specifies the total number of characters to write
       (which  is  also	 the  number  of  significant  digits in the formatted
       string, since these two functions write only  digits).  For  `fcvtbuf',
       the  second  argument  DECIMALS	specifies  the number of characters to
       write after the decimal point; all digits for the integer part  of  VAL
       are always included.

	  Since	 `ecvtbuf'  and	 `fcvtbuf'  write  only	 digits	 in the output
       string, they record the location of the decimal point in `*DECPT',  and
       the  sign of the number in `*SGN'.  After formatting a number, `*DECPT'
       contains the number of digits to the left of the decimal point.	`*SGN'
       contains `0' if the number is positive, and `1' if it is negative.  For
       both functions, you supply a pointer BUF to an area of memory  to  hold
       the converted string.

RETURNS
       Both functions return a pointer to BUF, the string containing a charac‐
       ter representation of VAL.

PORTABILITY
       Neither function is ANSI C.

	  Supporting OS	 subroutines  required:	 `close',  `fstat',  `isatty',
       `lseek', `read', `sbrk', `write'.

SEE ALSO
       ecvtbuf	is  part  of the library.  The full documentation for is main‐
       tained as a Texinfo manual.  If info and are properly installed at your
       site, the command

	      info

       will give you access to the complete manual.

NEWLIB				  April 2010			    ECVTBUF(3)
[top]

List of man pages available for Cygwin

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net