cortesi Tue May 28 20:37:36 2002 EDT Modified files: /phpdoc-it/language operators.xml Log: update to 1.35 Index: phpdoc-it/language/operators.xml diff -u phpdoc-it/language/operators.xml:1.7 phpdoc-it/language/operators.xml:1.8 --- phpdoc-it/language/operators.xml:1.7 Mon Mar 18 14:01:56 2002 +++ phpdoc-it/language/operators.xml Tue May 28 20:37:36 2002 @@ -1,10 +1,123 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.32 Maintainer: spisto Status: working --> +<!-- EN-Revision: 1.35 Maintainer: spisto Status: ready --> <chapter id="language.operators"> <title>Operatori</title> <simpara> </simpara> + <sect1 id="language.operators.precedence"> + <title>Precedenza degli operatori</title> + <para> + La precedenza di un operatore specifica come esso tenga legate assieme +"strettamente" due + espressioni. Per esempio, nell'espressione <literal>1 + + 5 * 3</literal>, la risposta è <literal>16</literal> e non + <literal>18</literal> perché l'operatore di moltiplicazione ("*") + ha una precedenza più alta rispetto all'operatore di addizione ("+"). + Le parentesi possono essere usate per forzare la precedenza, se necessario. Per + esempio: <literal>(1 + 5) * 3</literal> viene valutata + <literal>18</literal>. + </para> + <para> + La seguente tabella fornisce una lista della precedenza degli operatori con gli + operatori a più bassa precedenza listati prima. + <table> + <title>Precedenza degli operatori</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Associatività</entry> + <entry>Operatori</entry> + </row> + </thead> + <tbody> + <row> + <entry>sinistra</entry> + <entry>,</entry> + </row> + <row> + <entry>sinistra</entry> + <entry>or</entry> + </row> + <row> + <entry>sinistra</entry> + <entry>xor</entry> + </row> + <row> + <entry>sinistra</entry> + <entry>and</entry> + </row> + <row> + <entry>destra</entry> + <entry>print</entry> + </row> + <row> + <entry>sinistra</entry> + <entry> + = += -= *= /= .= %= &= |= ^= ~= <<= >>= + </entry> + </row> + <row> + <entry>sinistra</entry> + <entry>? :</entry> + </row> + <row> + <entry>sinistra</entry> + <entry>||</entry> + </row> + <row> + <entry>sinistra</entry> + <entry>&&</entry> + </row> + <row> + <entry>sinistra</entry> + <entry>|</entry> + </row> + <row> + <entry>sinistra</entry> + <entry>^</entry> + </row> + <row> + <entry>sinistra</entry> + <entry>&</entry> + </row> + <row> + <entry>non associativi</entry> + <entry>== != === !==</entry> + </row> + <row> + <entry>non associativi</entry> + <entry>< <= > >=</entry> + </row> + <row> + <entry>sinistra</entry> + <entry><< >></entry> + </row> + <row> + <entry>sinistra</entry> + <entry>+ - .</entry> + </row> + <row> + <entry>sinistra</entry> + <entry>* / %</entry> + </row> + <row> + <entry>destra</entry> + <entry>! ~ ++ -- (int) (float) (string) (array) (object) @</entry> + </row> + <row> + <entry>destra</entry> + <entry>[</entry> + </row> + <row> + <entry>non associativi</entry> + <entry>new</entry> + </row> + </tbody> + </tgroup> + </table> + </para> + </sect1> + <sect1 id="language.operators.arithmetic"> <title>Operatori aritmetici</title> <simpara> @@ -50,7 +163,13 @@ </tbody> </tgroup> </table> + <simpara> + L'operatore di divisione ("/") restituisce un valore float in ogni caso, + anche se i due operandi sono interi (oppure stringhe che + vengono convertite in interi). + </simpara> + <!-- <simpara> L'operatore di divisione ("/") restituisce un valore intero (il risultato di una divisione intera) se i due operandi sono interi (o @@ -59,6 +178,7 @@ risultato dell'operazione è un valore non intero, viene restituito un valore in virgola mobile. </simpara> + --> </sect1> <sect1 id="language.operators.assignment"> @@ -497,119 +617,6 @@ </simpara> </sect1> - <sect1 id="language.operators.precedence"> - <title>Precedenza degli operatori</title> - <para> - La precedenza di un operatore specifica come esso tenga legate assieme "strettamente" due - espressioni. Per esempio, nell'espressione <literal>1 + - 5 * 3</literal>, la risposta è <literal>16</literal> e non - <literal>18</literal> perché l'operatore di moltiplicazione ("*") - ha una precedenza più alta rispetto all'operatore di addizione ("+"). - Le parentesi possono essere usate per forzare la precedenza, se necessario. Per - esempio: <literal>(1 + 5) * 3</literal> viene valutata - <literal>18</literal>. - </para> - <para> - La seguente tabella fornisce una lista della precedenza degli operatori con gli - operatori a più bassa precedenza listati prima. - <table> - <title>Precedenza degli operatori</title> - <tgroup cols="2"> - <thead> - <row> - <entry>Associatività</entry> - <entry>Operatori</entry> - </row> - </thead> - <tbody> - <row> - <entry>sinistra</entry> - <entry>,</entry> - </row> - <row> - <entry>sinistra</entry> - <entry>or</entry> - </row> - <row> - <entry>sinistra</entry> - <entry>xor</entry> - </row> - <row> - <entry>sinistra</entry> - <entry>and</entry> - </row> - <row> - <entry>destra</entry> - <entry>print</entry> - </row> - <row> - <entry>sinistra</entry> - <entry> - = += -= *= /= .= %= &= |= ^= ~= <<= >>= - </entry> - </row> - <row> - <entry>sinistra</entry> - <entry>? :</entry> - </row> - <row> - <entry>sinistra</entry> - <entry>||</entry> - </row> - <row> - <entry>sinistra</entry> - <entry>&&</entry> - </row> - <row> - <entry>sinistra</entry> - <entry>|</entry> - </row> - <row> - <entry>sinistra</entry> - <entry>^</entry> - </row> - <row> - <entry>sinistra</entry> - <entry>&</entry> - </row> - <row> - <entry>non associativi</entry> - <entry>== != === !==</entry> - </row> - <row> - <entry>non associativi</entry> - <entry>< <= > >=</entry> - </row> - <row> - <entry>sinistra</entry> - <entry><< >></entry> - </row> - <row> - <entry>sinistra</entry> - <entry>+ - .</entry> - </row> - <row> - <entry>sinistra</entry> - <entry>* / %</entry> - </row> - <row> - <entry>destra</entry> - <entry>! ~ ++ -- (int) (double) (string) (array) (object) @</entry> - </row> - <row> - <entry>destra</entry> - <entry>[</entry> - </row> - <row> - <entry>non associativi</entry> - <entry>new</entry> - </row> - </tbody> - </tgroup> - </table> - </para> - </sect1> - <sect1 id="language.operators.string"> <title>Operatori di stringa</title> <simpara> @@ -619,7 +626,7 @@ assegnazione concatenata ('.='), che aggiunge alla fine dell'argomento sul lato destro l'argomento sul lato sinistro. Per favore consultare <link linkend="language.operators.assignment">Operatori di - assegnamento</link> per maggiori informazioni. + assegnazione</link> per maggiori informazioni. </simpara> <para>