开发者

Usual Arithmetic Conversions

In here (msdn) I've read about uac and everything is well and fine but last rule is bit disturbing. If I have two operands of type unsigned short will they b开发者_如何学Pythone converted to int not to unsiged int?


Thins might have something to do with chains of conversions. Although you don't need the int to be signed, it isn't harmful to use a signed int, either. SO in principle, both options should work.

By using the "normal" / signed int, you end up with a less restrictive case for further conversion.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜