tags:

views:

81

answers:

1
+2  Q: 

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 expression?

variable1 = (CInt(variable2) MOD 3600) \ 60
+4  A: 

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

recursive