https://issues.dlang.org/show_bug.cgi?id=18290

--- Comment #2 from Răzvan Ștefănescu <ru...@rumbu.ro> ---
(In reply to Tiberiu Lepadatu from comment #1)
> (In reply to Răzvan Ștefănescu from comment #0)
> > string input = "80000000";
> > auto x = parse!int(input, 16);
> > //ConvOverflowException
> 
> I feel that this is not a bug. To show that you
> are using a hex string you must use "0x" in front.
> If you write "0x80000000" instead of "80000000"
> there is no bug.

parsing 0x80000000 will read only the "0" before x, which is not the intended
behavior, therefore x will become 0, not -2147483648.

In order to show that I am using a hex string, I specify the radix (16). To go
further, how do I parse a string with radix 7? How do I prefix the string?

--

Reply via email to