svn: /phpdoc/es/trunk/reference/strings/functions/ print.xml

From: Date: Mon, 06 Dec 2010 03:42:12 +0000
Subject: svn: /phpdoc/es/trunk/reference/strings/functions/ print.xml
Groups: php.doc.es 
Request: Send a blank email to doc-es+get-3860@lists.php.net to get a copy of this message
yago Mon, 06 Dec 2010 03:42:12 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=305989 Log: updated to the most recent version. Changed paths: A phpdoc/es/trunk/reference/strings/functions/print.xml Added: phpdoc/es/trunk/reference/strings/functions/print.xml =================================================================== --- phpdoc/es/trunk/reference/strings/functions/print.xml (rev 0) +++ phpdoc/es/trunk/reference/strings/functions/print.xml 2010-12-06 03:42:12 UTC (rev 305989) @@ -0,0 +1,137 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision$ --> +<!-- EN-Revision: 297028 Maintainer: yago Status: ready --> +<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://docbook.org/ns/docbook" xml:id="function.print"> + <refnamediv> + <refname>print</refname> + <refpurpose>Mostrar una cadena</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>int</type><methodname>print</methodname> + <methodparam><type>string</type><parameter>arg</parameter></methodparam> + </methodsynopsis> + <para> + Muestra el parámetro <parameter>arg</parameter>. + </para> + <para> + <function>print</function> no es realmente una función (es un constructor de lenguaje) + por lo tanto no es necesario usar paréntesis + para indicar su lista de argumentos. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>arg</parameter></term> + <listitem> + <para> + Los datos de entrada. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Siempre devuelve <literal>1</literal>. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Ejemplos de <function>print</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +print("Hola mundo"); + +print "print() también funciona sin paréntesis."; + +print "Esto separa +múltiples líneas. Los saltos de línea también +se mostrarán"; + +print "Esto separa\nmúltiples líneas. Los salos de línea también\nse mostrarán."; + +print "para escapar caracteres se \"hace así\"."; + +// También se puede usar variables usando print +$foo = "foobar"; +$bar = "barbaz"; + +print "foo es $foo"; // foo es foobar + +// También se pueden usar arrays +$bar = array("value" => "foo"); + +print "Esto es {$bar['value']} !"; // Esto es foo ! + +// Al usar comillas simples se mostrará el nombre de la variable, no su valor +print 'foo is $foo'; // foo is $foo + +// Si no se necesita mostrar otros caracteres, se puede simplemente mostrar variables +print $foo; // foobar + +print <<<END +Este párrafo utiliza la sintaxis "here document" para mostrar +múltiples líneas con la interpolación de $variable. Nótese +que el terminador de here document debe aparecer al final +de la línea con punto y coma y ¡ningún espacio en blanco extra! +END; +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + &note.language-construct; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>echo</function></member> + <member><function>printf</function></member> + <member><function>flush</function></member> + <member><link linkend="language.types.string.syntax.heredoc">Sintaxis de Heredoc</link></member> + </simplelist> + </para> + </refsect1> + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Property changes on: phpdoc/es/trunk/reference/strings/functions/print.xml ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native

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