Xref: utzoo comp.lang.c:31424 comp.os.msdos.programmer:687 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!uw-beaver!ubc-cs!fornax!rosen From: rosen@fornax.UUCP (Wilf Rosen) Newsgroups: comp.lang.c,comp.os.msdos.programmer Subject: Turbo C printf problem Message-ID: <1168@fornax.UUCP> Date: 29 Aug 90 07:18:06 GMT Organization: School of Computing Science, SFU, Burnaby, B.C. Canada Lines: 23 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 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