svn: /phpdoc/es/trunk/ language/control-structures/alternative-syntax.xml translation.xml
| From: | Juan Pablo Berdejo | Date: | Mon, 19 Apr 2010 15:29:24 +0000 |
| Subject: | svn: /phpdoc/es/trunk/ language/control-structures/alternative-syntax.xml translation.xml | ||
| Groups: | php.doc.es | ||
| Request: | Send a blank email to doc-es+get-2438@lists.php.net to get a copy of this message | ||
jpberdejo Mon, 19 Apr 2010 15:29:24 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=298171
Log:
Nuevos archivos traducidos
Changed paths:
A phpdoc/es/trunk/language/control-structures/alternative-syntax.xml
U phpdoc/es/trunk/translation.xml
Added: phpdoc/es/trunk/language/control-structures/alternative-syntax.xml
===================================================================
--- phpdoc/es/trunk/language/control-structures/alternative-syntax.xml (rev
0)
+++ phpdoc/es/trunk/language/control-structures/alternative-syntax.xml 2010-04-19 15:29:24 UTC (rev
298171)
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision$ -->
+<!-- EN-Revision: 291258 Maintainer: jpberdejo Status: ready -->
+
+<sect1 xml:id="control-structures.alternative-syntax" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
+ <title>Sintaxis alternativa de estructuras de control</title>
+ <para>
+ PHP ofrece una sintaxis alternativa para algunas de sus estructuras
+ de control; a saber: <literal>if</literal>,
+ <literal>while</literal>, <literal>for</literal>,
+ <literal>foreach</literal>, and <literal>switch</literal>.
+ En cada caso, la forma básica de la sintaxis alternativa es cambiar
+ el corchete de apertura por dos puntos (:) y el corchete de cierre por
+ <literal>endif;</literal>, <literal>endwhile;</literal>,
+ <literal>endfor;</literal>, <literal>endforeach;</literal>, o
+ <literal>endswitch;</literal>, respectivamente.
+ <informalexample>
+ <programlisting role="php">
+<![CDATA[
+<?php if ($a == 5): ?>
+A is equal to 5
+<?php endif; ?>
+]]>
+ </programlisting>
+ </informalexample>
+ </para>
+ <simpara>
+ En el ejemplo anterior, el bloque HTML "A es igual a 5" se anida dentro de una
+ sentencia <literal>if</literal> escrita en la sintaxis alternativa. El
+ bloque HTML se mostraría solamente si <varname>$a</varname> es igual a 5.
+ </simpara>
+ <para>
+ La sintaxis alternativa también se aplica a <literal>else</literal> y
+ <literal>elseif</literal>. El siguiente es una estructura
+ <literal>if</literal> con <literal>elseif</literal> y
+ <literal>else</literal> en el formato alternativo:
+ <informalexample>
+ <programlisting role="php">
+<![CDATA[
+<?php
+if ($a == 5):
+ echo "a equals 5";
+ echo "...";
+elseif ($a == 6):
+ echo "a equals 6";
+ echo "!!!";
+else:
+ echo "a is neither 5 nor 6";
+endif;
+?>
+]]>
+ </programlisting>
+ </informalexample>
+ </para>
+ <note>
+ <para>
+ No se soporta la mezcla se sintaxis en el mismo bloque de control.
+ </para>
+ </note>
+ <para>
+ Véase también <link linkend="control-structures.while">while</link>,
+ <link linkend="control-structures.for">for</link> e <link
+ linkend="control-structures.if">if</link> para más ejemplos.
+ </para>
+</sect1>
+
+<!-- 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/language/control-structures/alternative-syntax.xml
___________________________________________________________________
Added: svn:keywords
+ Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
Added: svn:eol-style
+ native
Modified: phpdoc/es/trunk/translation.xml
===================================================================
--- phpdoc/es/trunk/translation.xml 2010-04-19 15:29:19 UTC (rev 298170)
+++ phpdoc/es/trunk/translation.xml 2010-04-19 15:29:24 UTC (rev 298171)
@@ -50,6 +50,7 @@
<file name="/reference/runkit/*" person="seros" type="working"
date="12.02.2010"/>
<file name="/reference/strings/*" person="benjamin"
type="working" date="23.12.2009"/>
<file name="/reference/swf/*" person="jesusruiz" type="working"
date="12.03.2010"/>
+ <file name="/language/control-structures/*" person="jpberdejo"
type="working" date="19.04.2010"/>
</work-in-progress>
</translation>