开发者

Overusing CInt?

I am fixing a defect in some classic ASP using VBScript and I've come across the following line:

variable1 = CInt((CInt(variable2) MOD CInt(3600))\ CInt(60))

Is it necessary to call CInt(3600) and CInt(60) when we are using them in an expression? Would this be an equivalent expr开发者_如何学Pythonession?

variable1 = (CInt(variable2) MOD 3600) \ 60


Integer literals are already integer type, as are arithmetic operations on integers. The two expressions are equivalent.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜