c style casts

Jacob Carlborg via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jan 15 07:13:37 PST 2016


On 2016-01-15 11:16, Warwick wrote:
> I though C style casts were not supported? But when I accidentaly did
>
> int i;
> if (uint(i) < length) ....
>
> it compiled and worked fine. Whys that?

Wouldn't a C style cast be:

int i;
if ((uint)i < length)

?

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list