Hello all,

Is this a bug or not:

#include <math.h>

#include <stdio.h>

int main(int argc, char *argv[])

{

long double ld;

char szText[20];

ld = 2.88;

ldtoa(ld, szText);

printf("%s\n", szText);

return 0;

}

I get the compiler message: undefined referenze to 'ldtoa'.

But if I write my source code, at the time I write ldtoa a

quickinfo comes with the description of this funktion.

But I do not found this function in crtdll.dll.

Regards

Eberhard

"Eberhard Funck" <NOSPAM:: XXXX@XXXXX.COM ::NOSPAM> wrote

It will not be in there because it is a C99 function which MS does not

support in crtdll.dll.

It does appear to be a bug as it should be part of a library supplied

with lcc-win32.

Try this for now.

sprintf(szText, "%Lf", ld);

John

Hello John,

thank you for your answer and help.

I have write my own function "ftoa"

in the same way you show me.

Regards

Eberhard

I see not ldtoa specified in N869, and there is no reason for

such, since your sprintf solution is perfectly general. C99 adds

the appropriate format specifiers.

--

Chuck F ( XXXX@XXXXX.COM ) ( XXXX@XXXXX.COM )

Available for consulting/temporary embedded and systems.

< http://www.yqcomputer.com/ > USE worldnet address!

wrote

I don't know where ldtoa comes from but lcc-win32 has it in math.h

John

1. Math.random() and Math.round(Math.random()) and Math.floor(Math.random()*2)

2. Math.random() and Math.round(Math.random()) and Math.floor(Math.random()*2)

3. How should ctype.h's functions be used?

4. math.h trig functions questions (and some forgotten high school math)

5. Where to find complex matrix math add-ins for Excel 2003?

6. Is there a way to have math that is not "display math" look like ?display math?

7. FA: 1-Day-Left: 6 Math Books - 4 Math CDROMs - Algebra, Discrete Math, Calculus, more...

8. Is there a way to have math that is not "display math" look like display math?

9. Is there a way to have math that is not "display math" look like display math?

10. efficiency: database functions vs. math functions vs. array formula

11. Differences between Math.Exp() (.NET function) and exp() standard function)

13. WET - H's H and H the 8th :-) <wma>

15. [PATCH 2.6.11-rc2 05/29] ide: merge pci driver .h's into .c's

6 post • Page:**1** of **1**