Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update gmp_strval
  • Loading branch information
DavidePastore committed Mar 2, 2026
commit 3a0006cf29ce4d2817160137a5e70e431b19725f
104 changes: 69 additions & 35 deletions reference/gmp/functions/gmp-strval.xml
Original file line number Diff line number Diff line change
@@ -1,41 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- splitted from ./it/functions/gmp.xml, last change in rev 1.1 -->
<!-- last change to 'gmp-strval' in en/ tree in rev 1.1 -->
<!-- EN-Revision: n/a Maintainer: calandra Status: ready -->
<!-- OLD-Revision: 1.25/EN.1.1 -->
<refentry xml:id="function.gmp-strval" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>gmp_strval</refname>
<refpurpose>Converte un numero GMP in una stringa</refpurpose>
</refnamediv>
<refsect1>
<title>Descrizione</title>
<methodsynopsis>
<type>string</type><methodname>gmp_strval</methodname>
<methodparam><type>resource</type><parameter>gmpnumber</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>base</parameter></methodparam>
</methodsynopsis>
<para>
Converte un numero GMP in una stringa rappresentato in base
<parameter>base</parameter>. La base di default è 10. Le basi
consentite variano dal 2 al 36.
</para>
<para>
<example>
<title>Converte un numero GMP in una stringa</title>
<programlisting role="php">
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 43130349a3f4681a2039e7e27fb56082981cdc13 Maintainer: pastore Status: ready -->
<!-- CREDITS: calandra -->
<refentry xml:id="function.gmp-strval" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>gmp_strval</refname>
<refpurpose>Converti un numero GMP in stringa</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>gmp_strval</methodname>
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>base</parameter><initializer>10</initializer></methodparam>
</methodsynopsis>
<para>
Converte un numero GMP nella sua rappresentazione in stringa nella base
<parameter>base</parameter>. La base predefinita è 10.
</para>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>num</parameter></term>
<listitem>
<para>
Il numero GMP che verrà convertito in stringa.
</para>
&gmp.parameter;
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>base</parameter></term>
<listitem>
<para>
La base del numero restituito. La base predefinita è 10.
I valori consentiti per la base sono da 2 a 62 e da -2 a -36.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Il numero, come <type>string</type>.
</para>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Conversione di un numero GMP in stringa</title>
<programlisting role="php">
<![CDATA[
<?php
$a = gmp_init("0x41682179fbf5");
printf ("Decimal: %s, 36-based: %s", gmp_strval($a), gmp_strval($a,36));
$a = gmp_init("0x41682179fbf5");
printf("Decimale: %s, base 36: %s", gmp_strval($a), gmp_strval($a,36));
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>

</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand All @@ -55,4 +89,4 @@ End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
-->