implicit ubyte casting

Saaa empty at needmail.com
Thu Oct 1 09:20:41 PDT 2009


Jeremie Pelletier wrote
>
> Then why use an ubyte instead of a byte or an int?
I wasn't me who wrote that part of the code :)

>
> You could also just do:
> for(int i = cast(byte)nloop; i < 10; i++)
I forgot the minus sign:
for(int i = -cast(int)nloop;i< 10; i++)

Still think it is unnecessary bug-prone.







More information about the Digitalmars-d-learn mailing list