Click here to return to the KiXtart HelpDesk main page...

KiXtart 2001 Manual

CInt( )

Action: Casts an expression to a variant of subtype Integer.
Syntax: CInt (expression)


Any valid expression.

Returns: A variant of subtype Integer.
Remarks: 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.
See Also: CDbl( ), CStr( ), FormatNumber( ), Round( )