delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/08/03/12:39:22

Date: Wed, 3 Aug 1994 08:52:59 -0500
From: drodger AT cla320 DOT utsi DOT edu
To: djgpp AT sun DOT soe DOT clarkson DOT edu


	I am a new  C programmer so I apologize if this question is trivial.
Anyway I am having trouble declaring  DOUBLE  type with  version 1.10 of
the DJ port.
	I have written a simple program that quits when   number == 0
it looks like this

	double number;

	scanf("1f", &number);
	if (number == 0)
	    done = TRUE


If I use FLOAT in place of DOUBLE  it works fine.  Using DOUBLE the
program won't allow me to exit.  I tried printing out the value of
"number" after I input 0  and the following error occured.
 
If I use double and add a printf statement after the scanf   line
it gives me the following error

	Exception 117 (0x75) at eip=209b
	Call frame traceback EIPs:
		0x00000209b
		0x0000018ec
		0x000001154

Due I need to do something special when declaring a DOULBE variable?

I am not currently on the djgpp mailing list.  Could a copy of the response
be sent to
		drodger AT cla320 DOT utsi DOT edu

thank you for any assistance that you can give.

Jaime Taylor



 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019