CInt Function

рдХреБрдиреИ рд╕реНрдЯреНрд░рд┐рдЩ рд╡рд╛ рд╕рдЩреНрдЦреНрдпрд╛рддреНрдордХ рдЕрднрд┐рд╡реНрдпрдХреНрддрд┐ рдЗрдиреНрдЯрд┐рдЬрд░рдорд╛ рд░реВрдкрд╛рдиреНрддрд░рдг рдЧрд░реНрджрдЫ ред

рд╡рд╛рдХреНрдп рд╕рдВрд░рдЪрдирд╛:


CInt (рдЕрднрд┐рд╡реНрдпрдХреНрддрд┐)

рдорд╛рди рдлрд░реНрдХрд╛рдЙрдиреБрд╣реЛрд╕реН:

Integer

рдкрд░рд╛рдорд┐рддрд┐рд╣рд░реВ:

Expression: Any expression that you want to convert.

If the argument is a number, it is used as numeric value of the expression.

If the argument is string, the function trims the leading white space; then it tries to recognize a number in following characters. The syntax below are recognized:

The rest of the string is ignored. If the string is not recognized, e.g. when after trimming leading whitespace it doesn't start with plus, minus, a decimal digit, or "&", or when the sequence after "&O" is longer than 11 characters or contains an alphabetic character, the numeric value of expression is 0.

If the argument is an error, the error number is used as numeric value of the expression.

If the argument is a date, number of days since 1899-12-30 (serial date) is used as numeric value of the expression. Time is represented as fraction of a day.

After calculating the numeric value of the expression, it is rounded to the nearest integer (if needed), and if the result is not between -32768 and 32767, LibreOfficeDev Basic reports an overflow error. Otherwise, the result is returned.

рддреНрд░реБрдЯрд┐ рд╕рдЩреНрдХреЗрддрд╣рд░реВ

5 рдЕрд╡реИрдз рдХрд╛рд░реНрдп-рд╡рд┐рдзрд┐ рдХрд▓

рдЙрджрд╛рд╣рд░рдг:


Sub ExampleCountryConvert
    MsgBox CDbl(1234.5678)
    MsgBox CInt(1234.5678)
    MsgBox CLng(1234.5678)
End Sub