From: "J.D. Piette" Newsgroups: comp.os.msdos.djgpp Subject: Problem with DJGPP? Date: Wed, 09 Apr 1997 19:11:38 -0400 Organization: IBM Microelectronics Division Lines: 24 Message-ID: <334C222A.4F9@lynx.dac.neu.edu> NNTP-Posting-Host: nschips.btv.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Hi, I recently downloaded DJGPP(the GCC2721 version) and RHIDE v1.2 and got everything set up and running fine. BTW I think the program is wonderful and I am thoroughly enjoying using it. My problem is that when I call the function atof(), it returns a value of 1.00. Here is the code segment. char buffer[80]; double price; .... .... printf("\n\nCurrent Price?"); gets(buffer); if(buffer[0]!='\0') { price=atof(buffer); } price always has a value of 1.00. I looked at it in the debugger and buffer has the correct value and if I use atoi() the correct number is assigned to price(the integer value). Any information as to why this is happening would be greatly appreciated. Please reply by e-mail.