Ayuda de LibreOffice 24.8
Convierte cualquier expresión de cadena o numérica en un entero.
CInt (Expression As Variant) As Integer
Integer
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:
Decimal numbers (with optional leading sign) using decimal and group separators of locale configured in LibreOffice (group separators are accepted in any position), with optional exponential notation like "-12e+1" (where an optionally signed whole decimal number after e or E or d or D defines power of 10);
Octal numbers like "&Onnn...", where "nnn..." after "&O" or "&o" is sequence no longer than 11 digits, from 0 to 7, up to the next non-alphanumeric character;
Hexadecimal numbers like "&Hnnn...", where "nnn..." after "&H" or "&h" is sequence of characters up to the next non-alphanumeric character, and must be no longer than 8 digits, from 0 to 9, A to F, or a to f.
Se ignora el resto de la cadena. Si la cadena no se reconoce, p. ej., cuando después de retirar el espacio en blanco al principio no empieza por «+», «−», una cifra decimal o «&», o bien, cuando la secuencia después de «&O» supera los 11 caracteres o contiene un carácter alfabético, el valor numérico de la expresión será de 0.
Si el argumento es un error, se utilizará el número del error como valor numérico de la expresión.
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, LibreOffice Basic reports an overflow error. Otherwise, the result is returned.