diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-23 14:33:52 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-23 22:29:23 +0100 |
commit | 03e4103f0ac0d4203d5d3e7ea2946611ed04799a (patch) | |
tree | 3367987d0f5bc801c917e63c3f890bee80737a65 /source | |
parent | f2cbbd18d34a7fb8ece9c774cdcb5a2e38fac957 (diff) |
tdf#145617: clarify help for CInt a bit
Change-Id: Ie3a110ddc7ce2fcfbb75377d9426c2772eeffbad
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/125708
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'source')
-rw-r--r-- | source/text/sbasic/shared/03100500.xhp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/text/sbasic/shared/03100500.xhp b/source/text/sbasic/shared/03100500.xhp index 1727fe9403..4a904186d7 100644 --- a/source/text/sbasic/shared/03100500.xhp +++ b/source/text/sbasic/shared/03100500.xhp @@ -45,8 +45,11 @@ <paragraph id="par_id3147560" role="paragraph" xml-lang="en-US">Integer</paragraph> <paragraph id="hd_id3145069" role="heading" level="2" xml-lang="en-US">Parameters:</paragraph> -<paragraph id="par_id3159414" role="paragraph" xml-lang="en-US"> <emph>Expression:</emph> Any numeric expression that you want to convert. If the <emph>Expression</emph> exceeds the value range between -32768 and 32767, $[officename] 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.</paragraph> -<paragraph id="par_id3150358" role="paragraph" xml-lang="en-US">This function always rounds the fractional part of a number to the nearest integer.</paragraph> +<paragraph id="par_id3159414" role="paragraph" xml-lang="en-US"> <emph>Expression:</emph> Any expression that you want to convert.</paragraph> +<paragraph id="par_id3159415" role="paragraph" xml-lang="en-US">If the argument is a number, it is used as numeric value of the expression.</paragraph> +<paragraph id="par_id3159416" role="paragraph" xml-lang="en-US">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 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.</paragraph> +<paragraph id="par_id3159417" role="paragraph" xml-lang="en-US">If the argument is an error, the error number is used as numeric value of the expression.</paragraph> +<paragraph id="par_id3150358" role="paragraph" xml-lang="en-US">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.</paragraph> <embed href="text/sbasic/shared/00000003.xhp#errorcode"/> <embed href="text/sbasic/shared/00000003.xhp#err5"/> |