Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > b3bdfe6d859a3d6920ff2c44b38e9a6f > files > 222

saxon-manual-9.4.0.9-2.mga7.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="expressions" page="arithmetic" subpage="addition"/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: Addition and subtraction</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title"
            content="Saxonica: XSLT and XQuery Processing: Addition and subtraction"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>Addition and subtraction</h1>
      <p>The operators <code>+</code> and <code>-</code> perform addition and subtraction of numbers,
in the usual way. If the operands are of different types, one of them is promoted, and the result
is the same type as the operands after promotion. For example, adding two integers produces
an integer; adding an integer to a double produces a double.</p>
      <p>Note that the <code>-</code> operator may need to be preceded by a space to prevent it being
parsed as part of the preceding name.</p>
      <p>XPath 2.0 also allows these operators to be used for adding durations to durations or to 
dates and times.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="../range.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>