summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-11-23 14:33:52 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-11-23 22:29:23 +0100
commit03e4103f0ac0d4203d5d3e7ea2946611ed04799a (patch)
tree3367987d0f5bc801c917e63c3f890bee80737a65
parentf2cbbd18d34a7fb8ece9c774cdcb5a2e38fac957 (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>
-rw-r--r--source/text/sbasic/shared/03100500.xhp7
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 &quot;-12e+1&quot; (where an optionally signed whole decimal number after e or E defines power of 10); octal numbers like &quot;&amp;Onnn...&quot;, where &quot;nnn...&quot; after &quot;&amp;O&quot; or &quot;&amp;o&quot; 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 &quot;&amp;Hnnn...&quot;, where &quot;nnn...&quot; after &quot;&amp;H&quot; or &quot;&amp;h&quot; 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 &quot;&amp;&quot;, or when the sequence after &quot;&amp;O&quot; 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"/>