Syntax
|
Int
(number)
|
Description
|
Returns the integer part of number.
|
Comments
|
This function returns the integer part of a given value by returning the first integer less than the number. The sign is preserved.
The
Int
function returns the same type as number, with the following exceptions:
- If number is
Empty
, then an
Integer
variant of value 0 is returned.
- f number is a
String
, then a
Double
variant is returned.
- If number is
Null
, then a
Null
variant is returned.
|
Example
|
This example extracts the integer part of a number.
Sub Main()
a# = -1234.5224
b% = Int(a#)
MsgBox "The integer part of -1234.5224 is: " & b%
End Sub
|
See Also
|
Fix (function); CInt (function).
|