Reputation: 2392
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 expression?
variable1 = (CInt(variable2) MOD 3600) \ 60
Upvotes: 2
Views: 462
Reputation: 86134
Integer literals are already integer type, as are arithmetic operations on integers. The two expressions are equivalent.
Upvotes: 6