summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-11-24 11:12:25 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-11-24 10:27:24 +0100
commit89f81cf2f81e2594a68956755114c733aeb041c5 (patch)
treeaf7a8a0b0e19166f54de0c55b3709efb148b1f7a
parentb57f294095c78e68a7b5f795163b8a75ac06198e (diff)
tdf#145617: Mention an alternative exponent notation
And add date to the possible argument types. Change-Id: Ie818c219e57cf706fdee278d54db1774a67e5d39 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/125716 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--source/text/sbasic/shared/03100500.xhp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/text/sbasic/shared/03100500.xhp b/source/text/sbasic/shared/03100500.xhp
index 4a904186d7..cb421b158e 100644
--- a/source/text/sbasic/shared/03100500.xhp
+++ b/source/text/sbasic/shared/03100500.xhp
@@ -47,8 +47,9 @@
<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 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_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 or d or D 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_id3159418" role="paragraph" xml-lang="en-US">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.</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"/>