Skip to content

Commit

Permalink
ext/bcmath: Moved scale description from language-snippets to bcadd (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
SakiTakamachi authored Jan 29, 2025
1 parent a414ee9 commit 3295741
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 22 deletions.
13 changes: 0 additions & 13 deletions language-snippets.ent
Original file line number Diff line number Diff line change
Expand Up @@ -2292,19 +2292,6 @@ extensions in order to use these functions.</simpara>'>

<!ENTITY sqlsafemode '<link xmlns="http://docbook.org/ns/docbook" linkend="ini.sql.safe-mode">SQL safe mode</link>'>

<!-- BCMath Notes -->
<!ENTITY bc.scale.description '<varlistentry xmlns="http://docbook.org/ns/docbook">
<term><parameter>scale</parameter></term>
<listitem>
<simpara>
This parameter is used to set the number of digits after the decimal place in the result.
If &null;, it will default to the default scale set with <function>bcscale</function>,
or fallback to the value of the
<link linkend="ini.bcmath.scale"><literal>bcmath.scale</literal></link> INI directive.
</simpara>
</listitem>
</varlistentry>'>

<!-- CTYPE Notes -->
<!ENTITY note.ctype.parameter.integer '<note xmlns="http://docbook.org/ns/docbook"><para>
If an <type>int</type> between -128 and 255 inclusive is provided, it is interpreted as
Expand Down
12 changes: 11 additions & 1 deletion reference/bc/functions/bcadd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,17 @@
</para>
</listitem>
</varlistentry>
&bc.scale.description;
<varlistentry xml:id="function.bcadd..parameters.scale">
<term><parameter>scale</parameter></term>
<listitem>
<simpara>
This parameter is used to set the number of digits after the decimal place in the result.
If &null;, it will default to the default scale set with <function>bcscale</function>,
or fallback to the value of the
<link linkend="ini.bcmath.scale"><literal>bcmath.scale</literal></link> INI directive.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
Expand Down
2 changes: 1 addition & 1 deletion reference/bc/functions/bcdiv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</para>
</listitem>
</varlistentry>
&bc.scale.description;
<xi:include xpointer="function.bcadd..parameters.scale" />
</variablelist>
</para>
</refsect1>
Expand Down
4 changes: 2 additions & 2 deletions reference/bc/functions/bcpow.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.bcpow" xmlns="http://docbook.org/ns/docbook">
<refentry xml:id="function.bcpow" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<refnamediv>
<refname>bcpow</refname>
<refpurpose>Raise an arbitrary precision number to another</refpurpose>
Expand Down Expand Up @@ -42,7 +42,7 @@
</para>
</listitem>
</varlistentry>
&bc.scale.description;
<xi:include xpointer="function.bcadd..parameters.scale" />
</variablelist>
</para>
</refsect1>
Expand Down
4 changes: 2 additions & 2 deletions reference/bc/functions/bcpowmod.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.bcpowmod" xmlns="http://docbook.org/ns/docbook">
<refentry xml:id="function.bcpowmod" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<refnamediv>
<refname>bcpowmod</refname>
<refpurpose>Raise an arbitrary precision number to another, reduced by a specified modulus</refpurpose>
Expand Down Expand Up @@ -51,7 +51,7 @@
</para>
</listitem>
</varlistentry>
&bc.scale.description;
<xi:include xpointer="function.bcadd..parameters.scale" />
</variablelist>
</para>
</refsect1>
Expand Down
6 changes: 3 additions & 3 deletions reference/bc/functions/bcsqrt.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.bcsqrt" xmlns="http://docbook.org/ns/docbook">
<refentry xml:id="function.bcsqrt" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<refnamediv>
<refname>bcsqrt</refname>
<refpurpose>Get the square root of an arbitrary precision number</refpurpose>
Expand Down Expand Up @@ -30,7 +30,7 @@
</para>
</listitem>
</varlistentry>
&bc.scale.description;
<xi:include xpointer="function.bcadd..parameters.scale" />
</variablelist>
</para>
</refsect1>
Expand All @@ -41,7 +41,7 @@
Returns the square root as a well-formed BCMath numeric string.
</para>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<para>
Expand Down

0 comments on commit 3295741

Please sign in to comment.