开发者

Overusing CInt?

开发者 https://www.devze.com 2022-12-10 18:11 出处:网络
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))

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

精彩评论

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