Skip to content

ext/bcmath: Moved scale description from language-snippets to bcadd #4423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions language-snippets.ent
Original file line number Diff line number Diff line change
Expand Up @@ -2265,19 +2265,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