Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!orion.oac.uci.edu!ucivax!jarthur!uunet!infonode!tan From: tan@infonode.ingr.com (Maribel Tan) Newsgroups: comp.sys.next Subject: Problem with Doubles Summary: Problem with doubles Message-ID: <1991May3.202741.14025@infonode.ingr.com> Date: 3 May 91 20:27:41 GMT Distribution: comp Organization: Intergraph Corp. Huntsville, AL Lines: 27 I am posting this in behalf of Jeroen, please reply directly to him. Thanks! ---- How to get my doubles?? I think there may be a bug in fscanf. When I try to read a double from a file using fscanf(io,"Pattern %lf\n",&my_var); it reads *GARBAGE* !! I also tried several variations, as suggested by RTFM: instead of %lf, neither %F, %lg, %G, %le, %E seem to work. In contrast, reading a float *DOES* work, so I know its not my input file. I compiled with -g -O , but leaving them out makes *NO* difference. E-Mail : jzijp@cs.uah.edu US-Mail: C.S. Dept. Univ. of Alabama/Huntsville, 515 Sparkman dr. Huntsville AL35899 Phone : (205)-895-6542 Thanks Folk! Jeroen ----