c style casts

Warwick via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jan 16 03:02:53 PST 2016


On Friday, 15 January 2016 at 15:13:37 UTC, Jacob Carlborg wrote:
> 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)

Yeah bad memory on my part, it's C++ cast, or one of them.





More information about the Digitalmars-d-learn mailing list