www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/05/15/14:56:06

Date: Mon, 15 May 1995 10:07:46 -0700 (PDT)
From: "Kent D. Lottis" <kentl AT bdc DOT cirrus DOT com>
To: Paul Koning 1695 <pkoning AT chipcom DOT com>
Cc: djgpp mailing list <djgpp AT sun DOT soe DOT clarkson DOT edu>
Subject: Re: BUG or what?! -- No

On Mon, 15 May 1995, Paul Koning 1695 wrote:

> 
> I know C is a screwed up language, but this I just can't believe.  Where
         ^^^^^^^^^^^^^^^^^^^^^^^^^^

What!? Heresy! Burn this man at the stake IMMEDIATELY     :-) :-) :-)

> does it say that?  And if it does say that, does anyone know why?  I can't
> think of any reason in parsing or anywhere else that would justify
> such a braindamaged rule.
> 
>      paul
> 
> >The C language requires you to have whitespace between a hex-number
> >ending in "e" and a subsequent "+" or "-".
> >
> >Morten
> 


I had decided to wait and see if anyone picked on Morten for failing
explaining WHY and sure enough, Paul fell for the bait.

Actually, Paul, there's a VERY good reason for this apparently bizarre rule.
Three words: Floating Point Constants. 

E.g.
float a = 12e4;
float b = 13e-2;
/* peculiar but legal usage: */
float c = 0x10e+3;
/* which is NOT the same as: */
float d = 0x10e + 3;

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
=  Kent D. Lottis                 kentl AT bdc DOT cirrus DOT com    =
=  Cirrus Logic, Inc., Bellevue Design Center             =
=                                                         =
=  Located in Washington state, home of exploding         =
=  mountains, sinking bridges, the Mariners, uncountable  =
=  tons of spent nuclear fuel, and Bill Gates.            =
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =


- Raw text -


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