02.10.2013 12:41, Jonathan M Davis пишет:
On Wednesday, October 02, 2013 12:32:24 Alexandr Druzhinin wrote:
Is it safe to replace code:
uint index;
// do something
index++;
if(index == index.max)
index = index.init;
by the following code
uint index;
// do something
index++; /// I use unsigned
On Wednesday, October 02, 2013 11:15:00 monarch_dodra wrote:
> Last time I read TDPL, I *seem* to remember that it stated that D
> targeted *exclusively* 2's complement architechture. So I'd
> conclude that, even if it is not *specified*, the only logical
> behavior for signed under/over flow, is t
On Wednesday, 2 October 2013 at 08:51:43 UTC, qznc wrote:
On Wednesday, 2 October 2013 at 05:41:50 UTC, Jonathan M Davis
wrote:
On Wednesday, October 02, 2013 12:32:24 Alexandr Druzhinin
wrote:
Is it safe to replace code:
uint index;
// do something
index++;
if(index == index.max)
index = inde
On Wednesday, 2 October 2013 at 05:41:50 UTC, Jonathan M Davis
wrote:
On Wednesday, October 02, 2013 12:32:24 Alexandr Druzhinin
wrote:
Is it safe to replace code:
uint index;
// do something
index++;
if(index == index.max)
index = index.init;
by the following code
uint index;
// do something
On Wednesday, October 02, 2013 12:32:24 Alexandr Druzhinin wrote:
> Is it safe to replace code:
>
> uint index;
> // do something
> index++;
> if(index == index.max)
> index = index.init;
>
> by the following code
> uint index;
> // do something
> index++; /// I use unsigned int so uint.max chang
Is it safe to replace code:
uint index;
// do something
index++;
if(index == index.max)
index = index.init;
by the following code
uint index;
// do something
index++; /// I use unsigned int so uint.max changed to 0 automagically
Thanks in advance