rosen@fornax.UUCP (Wilf Rosen) (08/29/90)
This evening I have encountered some inexplicable (to me) behavior
from the Borland Turbo C++ compiler. a 25MHz 386 clone that I sometimes
use the printf function will not correctly format float variables.
For example, the following program
#include <stdio.h>
void main()
{
float f=1.234;
printf("f=%f",f);
}
displays the f= text, but prints a long string orandom digits following
the '='. Since the program is simple enough that I believe I have it right,
I am concerned that I have made some error in some compiler or envoronment
option. The unusual behavior happens only with floating point data, and only
on this machine. I have not been able to find anything in the rather voluminous
Borland documentation or help files which sheds light on thiproblem. Any
suggestions would be greatly appreciated.
(The system is a 25MHz 386 Legend AT clone w/AMI BIOS, running DOS 3).
Thanks very much.
Wilf Rosenbaum