cvs: phpdoc-es /reference/strings/functions vprintf.xml

From: Date: Thu, 30 Jun 2005 15:52:32 +0000
Subject: cvs: phpdoc-es /reference/strings/functions vprintf.xml
Groups: php.doc.es 
Request: Send a blank email to doc-es+get-976@lists.php.net to get a copy of this message
javi Thu Jun 30 11:52:32 2005 EDT Modified files: /phpdoc-es/reference/strings/functions vprintf.xml Log: - Corregido EN-Revision - Pequeñas correcciones - Añadido un ejemplo al final http://cvs.php.net/diff.php/phpdoc-es/reference/strings/functions/vprintf.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-es/reference/strings/functions/vprintf.xml diff -u phpdoc-es/reference/strings/functions/vprintf.xml:1.2 phpdoc-es/reference/strings/functions/vprintf.xml:1.3 --- phpdoc-es/reference/strings/functions/vprintf.xml:1.2 Tue Aug 24 19:09:30 2004 +++ phpdoc-es/reference/strings/functions/vprintf.xml Thu Jun 30 11:52:30 2005 @@ -1,38 +1,60 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> -<!-- splitted from ./en/functions/strings.xml, last change in rev 1.124 --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.2 Maintainer: javi Status: ready --> <refentry id="function.vprintf"> <refnamediv> <refname>vprintf</refname> - <refpurpose>Imprimir una cadena con formato</refpurpose> + <refpurpose>Imprime una cadena con formato</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> - <type>int</type><methodname>vprintf</methodname> + <type>int</type><methodname>vfprintf</methodname> + <methodparam><type>resource</type><parameter>manejador</parameter></methodparam> <methodparam><type>string</type><parameter>formato</parameter></methodparam> <methodparam><type>array</type><parameter>args</parameter></methodparam> </methodsynopsis> <simpara> - Despliega los valores de una matriz como una cadena con formato - de acuerdo al <parameter>formato</parameter> (el cual es descrito - en la documentaci&oacute;n de <function>sprintf</function>). + Escribe una cadena construida con el formato especificado en <parameter>formato</parameter> + a un recurso identificado mediante el <parameter>manejador</parameter>. El formato que + debe seguir el par&aacute;metro <parameter>formato</parameter> es el mismo que el + descrito en la funci&oacute;n <function>sprintf</function>. </simpara> <simpara> - Opera como <function>printf</function> pero acepta una matriz - como sus argumentos, en lugar de un n&uacute;mero variable de + Opera como <function>printf</function> pero acepta una matriz + como sus argumentos, en lugar de un n&uacute;mero variable de argumentos. </simpara> <simpara> Devuelve la longitud de la cadena impresa. </simpara> <simpara> - Vea tambi&eacute;n - <function>printf</function>, <function>sprintf</function>, - <function>vsprintf</function> + Vea tambi&eacute;n <function>printf</function>, + <function>sprintf</function>, + <function>sscanf</function>, <function>fscanf</function>, + <function>vsprintf</function> y + <function>number_format</function>. </simpara> </refsect1> + <refsect1> + <title>Ejemplos</title> + <para> + <example> + <title><function>vfprintf</function>: enteros rellenos con ceros</title> + <programlisting role="php"> +<![CDATA[ +<?php +if (!($fp = fopen('fecha.txt', 'w'))) + return; + +vfprintf($fp, "%04d-%02d-%02d", array($ano, $mes, $dia)); +// escribe en fecha.txt la fecha formateada con el formato ISO +?> +]]> + </programlisting> + </example> + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file

« previous php.doc.es (#976) next »