CInt Function

ඕනැම සංඛ්‍යාත්මක හෝ අනු ලකුණු වැල් ප්‍රකාශනයක් නිඛිලයකට හරවයි.

කාරක රීතිය:

CInt (Expression)

ආපසු ලබාදෙන අගය:

Integer

පරාමිතීන්:

Expression: Any numeric expression that you want to convert. If the Expression exceeds the value range between -32768 and 32767, LibreOffice Basic reports an overflow error. To convert a string expression, the number must be entered as normal text ("123.5") using the default number format of your operating system.

මෙම ශ්‍රිතය හැම විටම සංඛ්‍යාවක භාගික කොටස ආසන්න නිඛිලයට වටයයි.

Error codes:

5 Invalid procedure call

උදාහරණය:

Sub ExampleCountryConvert

    MsgBox CDbl(1234.5678)

    MsgBox CInt(1234.5678)

    MsgBox CLng(1234.5678)

End Sub