45 lines
3 KiB
XML
45 lines
3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<helpdocument version="1.0">
|
|
<!--
|
|
* This file is part of the LibreOffice project.
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*
|
|
-->
|
|
<meta>
|
|
<topic id="calcfunc_decimal" indexer="include" status="PUBLISH">
|
|
<title id="tit">DECIMAL Function</title>
|
|
<filename>/text/scalc/01/func_decimal.xhp</filename>
|
|
</topic>
|
|
</meta>
|
|
<body>
|
|
<bookmark branch="index" id="bm_id3145166">
|
|
<bookmark_value>DECIMAL function</bookmark_value>
|
|
</bookmark>
|
|
<bookmark branch="hid/SC_HID_FUNC_DEZIMAL" id="bm_id3150338" localize="false"/>
|
|
<section id="func_decimal">
|
|
<h1 id="hd_id3145166">
|
|
<variable id="decimal_h1">
|
|
<link href="text/scalc/01/func_decimal.xhp">DECIMAL</link>
|
|
</variable>
|
|
</h1>
|
|
<paragraph id="par_id3156361" role="paragraph"><ahelp hid="HID_FUNC_DEZIMAL">Converts text that represents a number in a <link href="text/shared/00/00000005.xhp#number_system">numeral system</link> with the given base radix to a positive integer.</ahelp> The radix must be in the range 2 to 36. Spaces and tabs are ignored. The <emph>Text</emph> field is not case-sensitive.</paragraph>
|
|
</section>
|
|
<paragraph id="par_id3157994" role="paragraph">If the radix is 16, a leading x or X or 0x or 0X, and an appended h or H, are disregarded. If the radix is 2, an appended b or B is disregarded. Other characters that do not belong to the numeral system generate an error.</paragraph>
|
|
<embed href="text/scalc/01/common_func.xhp#sectionsyntax"/>
|
|
<paragraph id="par_id3154328" role="code">DECIMAL("Text"; Radix)</paragraph>
|
|
<paragraph id="par_id3150128" role="paragraph"> <emph>Text</emph> is the text to be converted.</paragraph>
|
|
<paragraph id="par_id3145241" role="paragraph"> <emph>Radix</emph> indicates the base of the numeral system. It may be any positive integer between 2 and 36.</paragraph>
|
|
<embed href="text/scalc/01/common_func.xhp#sectionexample"/>
|
|
<paragraph id="par_id3145355" role="paragraph"> <item type="input">=DECIMAL("17";10)</item> returns 17.</paragraph>
|
|
<paragraph id="par_id3155622" role="paragraph"> <item type="input">=DECIMAL("FACE";16)</item> returns 64206.</paragraph>
|
|
<paragraph id="par_id3151015" role="paragraph"> <item type="input">=DECIMAL("0101";2)</item> returns 5.</paragraph>
|
|
<section id="relatedtopics">
|
|
<tip id="par_id701677016652715"><link href="https://wiki.documentfoundation.org/Documentation/Calc_Functions/DECIMAL">DECIMAL wiki page</link>.</tip>
|
|
<paragraph role="paragraph" id="par_id421655560837244" localize="false"><embedvar href="text/scalc/01/func_base.xhp#base_h1"/></paragraph>
|
|
<paragraph role="paragraph" id="par_id81634670394769" localize="false"><embedvar href="text/scalc/01/04060110.xhp#head_text"/></paragraph>
|
|
</section>
|
|
</body>
|
|
</helpdocument>
|