CInt
Result = CInt ( Expression AS Variant ) AS Integer
Result = CInteger ( Expression AS Variant ) AS Integer
Converts an expression into an
Integer.
Errors
Examples
' Examples of conversion done using Cint function
PRINT CInt("17")
PRINT CInt(TRUE)
PRINT CInt(Now)
' Example illustrate the use of Cint function to truncate to whole number.
' See also Int function ( for similar example).
PRINT CInt(3.2)
PRINT CInt(3.9)
PRINT CInt(6)
PRINT CInt(-7.2)
PRINT CInt(-7.9)
See also