D arithmetic problem

Kagamin spam at here.lot
Thu Jun 4 06:04:45 PDT 2009


bearophile Wrote:

> In D instead of writing:
> uint x1 = -1;
> ushort x2 = -1;
> ubyte x3 = -1;
> 
> You can write this, that is clear and safe:
> uint x1 = uint.max;
> ushort x2 = ushort.max;
> ubyte x3 = ubyte.max;

How would you write this?
uintptr_t pageMask = -0x1000;



More information about the Digitalmars-d mailing list