Home > lang > cint 
 fr de es it nl pl pt pt_BR mk sq ca hu cs tr ar fa id vi ko ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Refresh  Search  Administration  
Documentation
History
 
CInt
Result = CInt ( Expression AS Variant ) AS Integer
Result = CInteger ( Expression AS Variant ) AS Integer

Converts an expression into an Integer.

Errors

MessageDescription
Type mismatch (6) Expression cannot be converted.

Example

' Examples of conversion done using Cint function
PRINT CInt("17")
PRINT CInt(TRUE)
PRINT CInt(Now)

17
-1
2484515

' 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)

3
3
6
-7
-7

See also

Conversion Functions