Xref: utzoo comp.sys.amiga:67557 comp.sys.amiga.tech:14774 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mcnc!rti!mozart!walker From: walker@unx.sas.com (Doug Walker) Newsgroups: comp.sys.amiga,comp.sys.amiga.tech Subject: Re: Lattice C double Message-ID: <1990Oct01.204550.8727@unx.sas.com> Date: 1 Oct 90 20:45:50 GMT References: <1990Sep28.063045.2599@ericsson.se> <1990Sep29.193407.28644@ux1.cso.uiuc.edu> Organization: SAS Institute Inc. Lines: 21 In article <1990Sep29.193407.28644@ux1.cso.uiuc.edu> ragg0270@uxa.cso.uiuc.edu (Richard Alan Gerber) writes: >n = fscanf(fp,"%e%e%e\n",num1,num2,num3); > > >This works like a charm. But when I replace "float" with "double" >everywhere it gives me total garbage. I don't know if the problem is >with me (programming error), compiler settings or a compiler bug. >Thanks for any help. Try replacing your %e's with %le's when you switch to double. You have to tell fscanf that you are passing pointers to double instead of pointers to float. ***** =*|_o_o|\\=====Doug Walker, Software Distiller====== BBS: (919)460-7430 = *|. o.| || | o |// For all you do, this bug's for you! ====== usenet: ...mcnc!rti!sas!walker plink: dwalker bix: djwalker