cvs: phpdoc-fr /language operators.xml

From: Date: Fri, 28 Jun 2002 17:36:37 +0000
Subject: cvs: phpdoc-fr /language operators.xml
Groups: php.doc.fr 
Request: Send a blank email to doc-fr+get-3@lists.php.net to get a copy of this message
dams Fri Jun 28 13:36:37 2002 EDT Modified files: /phpdoc-fr/language operators.xml Log: Correction de la traduction dans les dŽcaleurs de bit

Index: phpdoc-fr/language/operators.xml diff -u phpdoc-fr/language/operators.xml:1.17 phpdoc-fr/language/operators.xml:1.18 --- phpdoc-fr/language/operators.xml:1.17 Wed Dec 12 15:50:08 2001 +++ phpdoc-fr/language/operators.xml Fri Jun 28 13:36:36 2002 @@ -1,10 +1,119 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> +<!-- $Revision: 1.18 $ --> <chapter id="language.operators"> <title>Les op&eacute;rateurs</title> <simpara> </simpara> - <sect1 id="language.operators.arithmetic"> + <sect1 id="language.operators.precedence"> + <title>La pr&eacute;c&eacute;dence des op&eacute;rateurs</title> + <para> + La priorit&eacute; des op&eacute;rateurs sp&eacute;cifie + l'ordre dans lequel les valeurs doivent &ecirc;tre analys&eacute;es. + Par exemple, dans l'expression 1 + 5 * 3, le r&eacute;sultat est + 16 et non 18, car la multiplication ("*") &agrave; une + priorit&eacute; sup&eacute;rieure par rapport &agrave; + &agrave; l'addition ("+"). + </para> + <para> + Le tableau suivant dresse une liste de la priorit&eacute; des + diff&eacute;rents op&eacute;rateurs dans un ordre croissant de + priorit&eacute;. + <table> + <title>Pr&eacute;c&eacute;dence des op&eacute;rateurs</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Associativit&eacute;</entry> + <entry>Op&eacute;rateurs</entry> + </row> + </thead> + <tbody> + <row> + <entry>gauche</entry> + <entry>,</entry> + </row> + <row> + <entry>gauche</entry> + <entry>or</entry> + </row> + <row> + <entry>gauche</entry> + <entry>xor</entry> + </row> + <row> + <entry>gauche</entry> + <entry>and</entry> + </row> + <row> + <entry>droite</entry> + <entry>print</entry> + </row> + <row> + <entry>gauche</entry> + <entry>= += -= *= /= .= %= &amp;= |= ^= ~= &lt;&lt;=&gt;&gt;=</entry> + </row> + <row> + <entry>gauche</entry> + <entry>? :</entry> + </row> + <row> + <entry>gauche</entry> + <entry>||</entry> + </row> + <row> + <entry>gauche</entry> + <entry>&amp;&amp;</entry> + </row> + <row> + <entry>gauche</entry> + <entry>|</entry> + </row> + <row> + <entry>gauche</entry> + <entry>^</entry> + </row> + <row> + <entry>gauche</entry> + <entry>&amp;</entry> + </row> + <row> + <entry>non-associative</entry> + <entry>== != === !==</entry> + </row> + <row> + <entry>non-associative</entry> + <entry>&lt; &lt;= &gt; &gt;=</entry> + </row> + <row> + <entry>gauche</entry> + <entry>&lt;&lt; &gt;&gt;</entry> + </row> + <row> + <entry>gauche</entry> + <entry>+ - .</entry> + </row> + <row> + <entry>gauche</entry> + <entry>* / %</entry> + </row> + <row> + <entry>droite</entry> + <entry>! ~ ++ -- (int) (double) (string) (array) (object) &#64;</entry> + </row> + <row> + <entry>droite</entry> + <entry>[</entry> + </row> + <row> + <entry>non-associative</entry> + <entry>new</entry> + </row> + </tbody> + </tgroup> + </table> + </para> + </sect1> + <sect1 id="language.operators.arithmetic"> <title>Les op&eacute;rateurs arithm&eacute;tiques</title> <simpara> Vous rappelez-vous des op&eacute;rations &eacute;l&eacute;mentaires @@ -74,10 +183,12 @@ des astuces telles que : <informalexample> <programlisting role="php"> -&lt;?php +<![CDATA[ +<?php $a = ($b = 4) + 5; // $a est maintenant &eacute;gal &agrave; 9, et $b vaut 4. -?&gt; +?> +]]> </programlisting> </informalexample> </para> @@ -91,7 +202,8 @@ Par exemple: <informalexample> <programlisting role="php"> -&lt;?php +<![CDATA[ +<?php $a = 3; $a += 5; // affecte la valeur 8 &agrave; la variable $a. @@ -101,7 +213,8 @@ // affecte la valeur "Bonjour tout le monde!" &agrave; // la variable $b // identique &agrave; $b = $b." tout le monde!"; -?&gt; +?> +]]> </programlisting> </informalexample> </para> @@ -172,7 +285,7 @@ <entry>$a &lt;&lt; $b</entry> <entry>D&eacute;calage &agrave; gauche</entry> <entry> - D&eacute;cale les bits de $a dans $b par la gauche + D&eacute;cale les bits de $a $b fois sur la gauche (chaque d&eacute;calage &eacute;quivaut &agrave; une multiplication par 2). </entry> </row> @@ -180,7 +293,7 @@ <entry>$a &gt;&gt; $b</entry> <entry>D&eacute;calage &agrave; droite</entry> <entry> - D&eacute;calage des bits de $a dans $b par la droite + D&eacute;calage des bits de $a $b fois par la droite (chaque d&eacute;calage &eacute;quivaut &agrave; une division par 2). </entry> </row> @@ -256,9 +369,11 @@ ternaire (":?"), qui fonctionne comme en langage C. <informalexample> <programlisting role="php"> -&lt;?php +<![CDATA[ +<?php (expr1) ? (expr2) : (expr3); -?&gt; +?> +]]> </programlisting> </informalexample> Cette expression renvoie la valeur de l'expression @@ -286,14 +401,16 @@ <para> <informalexample> <programlisting role="php"> -&lt;?php +<![CDATA[ +<?php /* Erreur intentionnelle (le fichier n'existe pas): */ $my_file = @file ('non_persistent_file') or die ("Impossible d'ouvrir le fichier : L'erreur est : '$php_errormsg'"); // Cela fonctionne avec n'importe quelle expression, pas seulement les fonctions $value = @$cache[$key]; // la ligne ci-dessus n'affichera pas d'alerte si la cl&eacute; $key du tableau n'existe pas -?&gt; +?> +]]> </programlisting> </informalexample> </para> @@ -332,10 +449,12 @@ assign&eacute; &agrave; une variable). <informalexample> <programlisting role="php"> -&lt;?php +<![CDATA[ +<?php $output = `ls -al`; echo "&lt;pre&gt;$output&lt;/pre&gt;"; -?&gt; +?> +]]> </programlisting> </informalexample> </para> @@ -398,7 +517,8 @@ Voici un exempla simple <informalexample> <programlisting role="php"> -&lt;?php +<![CDATA[ +<?php echo "&lt;h3&gt;Post-incr&eacute;mentation&lt;/h3&gt;"; $a = 5; echo "Devrait valoir 5: " . $a++ . "&lt;br&gt;\n"; @@ -415,7 +535,8 @@ $a = 5; echo "Devrait valoir 4: " . --$a . "&lt;br&gt;\n"; echo "Devrait valoir 4: " . $a . "&lt;br&gt;\n"; -?&gt; +?> +]]> </programlisting> </informalexample> </para> @@ -473,115 +594,7 @@ <link linkend="language.operators.precedence">pr&eacute;c&eacute;dence d'op&eacute;rateurs</link>. </simpara> </sect1> - <sect1 id="language.operators.precedence"> - <title>La pr&eacute;c&eacute;dence des op&eacute;rateurs</title> - <para> - La priorit&eacute; des op&eacute;rateurs sp&eacute;cifie - l'ordre dans lequel les valeurs doivent &ecirc;tre analys&eacute;es. - Par exemple, dans l'expression 1 + 5 * 3, le r&eacute;sultat est - 16 et non 18, car la multiplication ("*") &agrave; une - priorit&eacute; sup&eacute;rieure par rapport &agrave; - &agrave; l'addition ("+"). - </para> - <para> - Le tableau suivant dresse une liste de la priorit&eacute; des - diff&eacute;rents op&eacute;rateurs dans un ordre croissant de - priorit&eacute;. - <table> - <title>Pr&eacute;c&eacute;dence des op&eacute;rateurs</title> - <tgroup cols="2"> - <thead> - <row> - <entry>Associativit&eacute;</entry> - <entry>Op&eacute;rateurs</entry> - </row> - </thead> - <tbody> - <row> - <entry>gauche</entry> - <entry>,</entry> - </row> - <row> - <entry>gauche</entry> - <entry>or</entry> - </row> - <row> - <entry>gauche</entry> - <entry>xor</entry> - </row> - <row> - <entry>gauche</entry> - <entry>and</entry> - </row> - <row> - <entry>droite</entry> - <entry>print</entry> - </row> - <row> - <entry>gauche</entry> - <entry>= += -= *= /= .= %= &amp;= |= ^= ~= &lt;&lt;=&gt;&gt;=</entry> - </row> - <row> - <entry>gauche</entry> - <entry>? :</entry> - </row> - <row> - <entry>gauche</entry> - <entry>||</entry> - </row> - <row> - <entry>gauche</entry> - <entry>&amp;&amp;</entry> - </row> - <row> - <entry>gauche</entry> - <entry>|</entry> - </row> - <row> - <entry>gauche</entry> - <entry>^</entry> - </row> - <row> - <entry>gauche</entry> - <entry>&amp;</entry> - </row> - <row> - <entry>non-associative</entry> - <entry>== != ===</entry> - </row> - <row> - <entry>non-associative</entry> - <entry>&lt; &lt;= &gt; &gt;=</entry> - </row> - <row> - <entry>gauche</entry> - <entry>&lt;&lt; &gt;&gt;</entry> - </row> - <row> - <entry>gauche</entry> - <entry>+ - .</entry> - </row> - <row> - <entry>gauche</entry> - <entry>* / %</entry> - </row> - <row> - <entry>droite</entry> - <entry>! ~ ++ -- (int) (double) (string) (array) (object) &#64;</entry> - </row> - <row> - <entry>droite</entry> - <entry>[</entry> - </row> - <row> - <entry>non-associative</entry> - <entry>new</entry> - </row> - </tbody> - </tgroup> - </table> - </para> - </sect1> + <sect1 id="language.operators.string"> <title>Op&eacute;rateurs de cha&icirc;nes</title> <simpara> @@ -596,14 +609,16 @@ <para> <informalexample> <programlisting role="php"> -&lt;?php +<![CDATA[ +<?php $a = "Bonjour "; $b = $a . "Monde!"; // $b contient "Bonjour Monde!" $a = "Bonjour "; $a = $a . "Monde!"; // $a contient "Bonjour Monde!" -?&gt; +?> +]]> </programlisting> </informalexample> </para>
« previous php.doc.fr (#3) next »