Mail Archives: djgpp/1997/02/15/11:22:19
From: | nikki AT gameboutique DOT co (nikki)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | weird gcc thing
|
Date: | 15 Feb 1997 13:27:14 GMT
|
Organization: | GameBoutique Ltd.
|
Lines: | 28
|
Message-ID: | <5e4dji$99q@flex.uunet.pipex.com>
|
NNTP-Posting-Host: | www.gameboutique.com
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
is there any particular reason why :
double wib;
wib= (double) atof(argv[2]);
or
float wib;
int a;
wib= (float) a;
should both give wrong values under djgpp? only these both work fine in
a program i've been porting from unix, yet the atof one will give wildly
wrong answers. eg if i made the argument '8.0' it gets evaluated as
wib=456246264624525.00 or something ridiculous. removing that casting makes
it work of course (and yes i know the casting is pointless here but it was
in the program i was converting :)
just wondered why this casting should cause a problem.
regards,
nik
--
Graham Tootell
nikki AT gameboutique DOT com
- Raw text -