Understanding and new language feature proposal

Sumit Adhikari sumit.adhikari at gmail.com
Mon Jan 6 02:33:26 PST 2014


Just a twist :

unsigned bits(179:0) a ;
unsigned bits(179:0) b ;
unsigned bits(190:0) result = a + b ;

OR

unsigned bits(108826676:0) result = a + b ;


Regards, Sumit


On Monday, 6 January 2014 at 09:41:12 UTC, bearophile wrote:
> Sumit Adhikari:
>
>> unsigned bits(179:0) a ;
>> unsigned bits(179:0) b ;
>> unsigned bits(179:0) result = a + b ;
>
> What about this syntax:
>
> UnsignedBits!(179, 0) a, b;
> UnsignedBits!(179, 0) result = a + b;
>
> Or better:
>
> alias ubits = UnsignedBits!(179, 0)
> ubits a, b;
> ubits result = a + b;
>
> Bye,
> bearophile



More information about the Digitalmars-d mailing list