It is possible to substract 5 from 3 unsigned integer

ikod igor.khasilev at gmail.com
Tue Oct 6 18:56:11 UTC 2020


On Tuesday, 6 October 2020 at 18:24:14 UTC, Alaindevos wrote:
> There are two subtractions possible.
> A machine-one which can be architecture dependent, does not 
> have the same results on all computers, and behaves like a 
> modulus in mathematics.
> A logical one. For the last one higher classes might be needed.

Hello,

You may try 
https://dlang.org/phobos/std_experimental_checkedint.html in this 
case.

Regards,


More information about the Digitalmars-d-learn mailing list