ASP/VBScript - Int() vs CInt()

Seibar picture Seibar · Aug 21, 2008 · Viewed 56k times · Source

What is the difference in ASP/VBScript between Int() and CInt()?

Answer

Pascal Paradis picture Pascal Paradis · Aug 21, 2008

The Int function returns the integer part of a specified number.

The CInt function converts an expression to type Integer.

And the best answer comes from MSDN

CInt differs from the Fix and Int functions, which truncate, rather than round, the fractional part of a number. When the fractional part is exactly 0.5, the CInt function always rounds it to the nearest even number. For example, 0.5 rounds to 0, and 1.5 rounds to 2.