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.
精彩评论