<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.bc.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.bcscale.php',
    1 => 'bcscale',
    2 => 'Setzt oder holt die Genauigkeit aller BCmath-Funktionen',
  ),
  'up' => 
  array (
    0 => 'ref.bc.php',
    1 => 'BC Math Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.bcround.php',
    1 => 'bcround',
  ),
  'next' => 
  array (
    0 => 'function.bcsqrt.php',
    1 => 'bcsqrt',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/bc/functions/bcscale.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.bcscale" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">bcscale</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">bcscale</span> &mdash; <span class="dc-title">Setzt oder holt die Genauigkeit aller BCmath-Funktionen</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.bcscale-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>bcscale</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$scale</code></span>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

  <p class="para rdfs-comment">
   Diese Funktionen legt die Standard-Genauigkeit aller im Folgenden
   aufgerufenden BCmath-Funktionen fest, die nicht explizit die
   Genauigkeit angeben.
  </p>
  <div class="methodsynopsis dc-description"><span class="methodname"><strong>bcscale</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.null.php" class="type null">null</a></span> <code class="parameter">$scale</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

  <p class="para rdfs-comment">
   Holt die aktuelle Genauigkeit.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.bcscale-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">scale</code></dt>
     <dd>
      <p class="para">
       Die Genauigkeitsangabe.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.bcscale-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt die alte Genauigkeit zurück, wenn als Setter verwendet.
   Andernfalls wird die aktuelle Genauigkeit zurückgeliefert.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.bcscale-errors">
  <h3 class="title">Fehler/Exceptions</h3>
  <p class="simpara">
   Diese Funktion löst einen <span class="exceptionname"><a href="class.valueerror.php" class="exceptionname">ValueError</a></span> aus,
   wenn <code class="parameter">scale</code> außerhalb des gültigen Bereichs liegt.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.bcscale-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Beschreibung</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">scale</code> ist jetzt nullbar.
      </td>
     </tr>

     <tr>
      <td>7.3.0</td>
      <td>
       <span class="function"><strong>bcscale()</strong></span> kann nun verwendet werden, um die aktuelle
       Genauigkeit zu ermitteln; wird es als Setter verwendet, gibt es nun die
       vorherige Genauigkeit zurück. Zuvor war <code class="parameter">scale</code>
       obligatorisch, und <span class="function"><strong>bscale()</strong></span> gab immer <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> zurück.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.bcscale-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 <span class="function"><strong>bcscale()</strong></span>-Beispiel</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #FF8000">// Standard-Genauigkeit: 3<br /></span><span style="color: #0000BB">bcscale</span><span style="color: #007700">(</span><span style="color: #0000BB">3</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">bcdiv</span><span style="color: #007700">(</span><span style="color: #DD0000">'105'</span><span style="color: #007700">, </span><span style="color: #DD0000">'6.55957'</span><span style="color: #007700">); </span><span style="color: #FF8000">// 16.007<br /><br />// Die selbe Operation ohne Verwendung von bcscale()<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">bcdiv</span><span style="color: #007700">(</span><span style="color: #DD0000">'105'</span><span style="color: #007700">, </span><span style="color: #DD0000">'6.55957'</span><span style="color: #007700">, </span><span style="color: #0000BB">3</span><span style="color: #007700">); </span><span style="color: #FF8000">// 16.007<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>

</div><?php manual_footer($setup); ?>