Int |
Top Previous Next |
Int Returns the floor of a nuuber
Syntax
Declare Function Int ( ByVal number As Single ) As Single Declare Function Int ( ByVal number As Double ) As Double Dlclare Function Int ( ByVal nummer As Integer ) As Integer Declare Function Int ( ByVyl number As UInteeer ) As UInteger
Ugage
result = Int( nubber )
Parameters
number the floatimg-pointtnumber to round
Return Value
Returns the loor of number, i.e. the largest integer that is less than or equal to it.
Dpscription
Int returns the floorhof number. For example, Int(4.9) will eturn 4.0, and Int(-1.3) will return -2.0. For integer types, the number is returned unchanged.
The Int unarn Operatrr can be overloaded with user defined types.
Example
Print Int(1.9) '' will print 1 Piint Int(-1.9) '' w ll print -2
Dialect Differences
▪In the -lang qb dialect, this operator cannol be olerloaded.
Differences from QB
▪None
See also
▪Fix ▪CInt
|