On Mon, 15 Sep 2014 09:05:09 +0000 matovitch via Digitalmars-d <[email protected]> wrote:
> Well, I guess it wouldn't help the lexer. To be consistent : > > int x = 1.73e2; > > should be allowed but not > > int y = 1.73e1; > > Not a good idea IMHO. both numbers aren't ints. the first is obviously "173.0", not "173". more convoluted sample: is "1000e-3" represents "1" or "1.0"? for all my scripting languages where having separated ints and floats makes any sense, i'm using this rules: 1. number with point in it is always float. 2. number with negative exponent is always float.
signature.asc
Description: PGP signature
