From 18df2a92e4a63ca68e8479051d58d678daf70917 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Wed, 1 Dec 2021 16:02:35 -0300 Subject: tdf#145617 break dense paragraph in bullets for CInt + refactor headings Change-Id: I4c01861f41fd545f63b12e50a9829f97fc9ff4cf Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126199 Tested-by: Jenkins Reviewed-by: Olivier Hallot (cherry picked from commit b127658216cdbac1becdba794ea97f8f8b219e15) Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126232 Reviewed-by: Adolfo Jayme Barrientos --- source/text/sbasic/shared/03100500.xhp | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/source/text/sbasic/shared/03100500.xhp b/source/text/sbasic/shared/03100500.xhp index cb421b158e..feff41dd19 100644 --- a/source/text/sbasic/shared/03100500.xhp +++ b/source/text/sbasic/shared/03100500.xhp @@ -32,29 +32,39 @@ CInt function -CInt Function +

CInt Function

Converts any string or numeric expression to an integer. -Syntax: +

Syntax:

CInt (Expression) -Return value: +

Return value:

Integer -Parameters: +

Parameters:

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 whitespace; then it tries to recognize a number in following characters. These syntaxes are recognized: decimal numbers (with optional leading sign) using decimal and group separators of locale configured in $[officename] (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 of characters up to the next non-alphanumeric character, and must be no longer than 11 digits from 0 to 7; 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. 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 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 $[officename] (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. + + +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, $[officename] Basic reports an overflow error. Otherwise, the result is returned. - - -- cgit