Mail Archives: djgpp/1995/02/21/07:38:34
I wrote:
>
> is there a function that converts a float into a string (like
> ecvt, fcvt, and gcvt in TURBO C). I am converting "by hand" and want
snip
> BTW: The TURBO C manual claims these funcions as "available on UNIX-
> Systems".
>
Thank's for your replies so far. sprintf() is the way to do it (now I see
that my problem was not very tricky [I take the blame on me]).
BUT: pascal DOT richard AT art DOT alcatel DOT fr (Pascal RICHARD) replied:
>
> I try a "man ecvt" on my UNIX station and it says that [efg]cvt are
> obsolet and that you should use [efg]convert instead.
>
So I looked into djgppstd.h for [efg]convert but didn't find them. Instead I
found these entries:
char* ecvt(double, int, int*, int*);
char* fcvt(double, int, int*, int*);
char* gcvt(double, int, char*);
Then Pieter Kunst (kunst AT prl DOT philips DOT nl) wrote:
>
>The functions ecvt, fcvt, gvct:
>
> char *ecvt(double value, size_t ndigit, int *decpt, int *sign);
> char *fcvt(double value, size_t ndigit, int *decpt, int *sign);
> char *gcvt(double value, size_t ndigit, char *buf);
>
> are *not* ANSI C functions (i.e. not portable). They only conform to XPG2.
>
Just a guess, but wouldn't it make sense to remove these lines (to avoid
confusion for people like me)? Or what is the reason that they are still
alive?
Thanks for reading, in confusion,
Armin
- Raw text -