Conversion problem.

Den_d_y tod.naz at ya.ru
Wed Jun 26 10:49:50 UTC 2019


On Wednesday, 26 June 2019 at 05:53:29 UTC, Den_d_y wrote:
> On Tuesday, 25 June 2019 at 16:44:28 UTC, H. S. Teoh wrote:
>> On Tue, Jun 25, 2019 at 12:08:07PM +0000, Den_d_y via 
>> Digitalmars-d-learn wrote:
>>> Hello! Here I am again, with my problem ... In my program, I 
>>> cannot manage to convert from "double" to "int". Here is the 
>>> code:
>> [...]
>>
>> Did you try this?
>>
>> 	import std.conv : to;
>>
>> 	double d = ...;
>> 	int i = d.to!int;
>>
>>
>> T
>
> This does not work. The program hangs at this stage, even the 
> code you have proposed also does not work as we would like. 
> Maybe I'm doing something wrong?

Something is tracked:
std.conv.ConvOverflowException at C: \ D \ dmd2 \ windows \ bin \ .. 
\ .. \ src \ phobos \ std \ conv.d (1457): Conversion Underflow 
Overflow
What could it be


More information about the Digitalmars-d-learn mailing list