geirm 02/04/17 12:38:53
Modified: xdocs user-guide.xml
docs user-guide.html
Log:
remove some misleading content
Revision Changes Path
1.64 +2 -39 jakarta-velocity/xdocs/user-guide.xml
Index: user-guide.xml
===================================================================
RCS file: /home/cvs/jakarta-velocity/xdocs/user-guide.xml,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- user-guide.xml 25 Mar 2002 16:13:45 -0000 1.63
+++ user-guide.xml 17 Apr 2002 19:38:52 -0000 1.64
@@ -1841,8 +1841,8 @@
<p>
When a division operation is performed, the result will be an
- integer. Any remainder can be obtained by using the remainder
- (<em>%</em>) operand.
+ integer. Any remainder can be obtained by using the modulus
+ (<em>%</em>) operator.
</p>
<source><![CDATA[
@@ -1853,43 +1853,6 @@
Only integers (...-2, -1, 0, 1, 2...) are permissible when
performing mathematical equations in Velocity; when a non-integer is
used, it is logged and a null will be returned as the output.
- </p>
-
- <p>
- Velocity has a built-in way of dealing with division by zero. In the
- following example:
- </p>
-
-<source><![CDATA[
-#set( $foo = 5 )
-#set( $bar = $foo - 5 )
-#set( $uhoh = $foo / $bar )
-$uhoh
-]]></source>
-
- <p>
- The reference <em>$uhoh</em> is assigned the value of five divided
- by zero. When Velocity renders this template, the output will be:
- </p>
-
-<source><![CDATA[
-$uhoh
-]]></source>
-
- <p>
- Designers should note that <em>set</em> produces strings, which
- must be converted to integers to be used by the range operator.
- This example shows such a conversion:
- </p>
-
-<source><![CDATA[
-#set($a = "7")
-#set($b = $int.valueOf($a) + 10)
-$b
-]]></source>
-
- <p>
- Yields the result <em>17</em>.
</p>
</subsection>
1.71 +2 -86 jakarta-velocity/docs/user-guide.html
Index: user-guide.html
===================================================================
RCS file: /home/cvs/jakarta-velocity/docs/user-guide.html,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- user-guide.html 25 Mar 2002 16:13:44 -0000 1.70
+++ user-guide.html 17 Apr 2002 19:38:53 -0000 1.71
@@ -3282,8 +3282,8 @@
</div>
<p>
When a division operation is performed, the result will be an
- integer. Any remainder can be obtained by using the remainder
- (<em>%</em>) operand.
+ integer. Any remainder can be obtained by using the modulus
+ (<em>%</em>) operator.
</p>
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
@@ -3310,90 +3310,6 @@
Only integers (...-2, -1, 0, 1, 2...) are permissible when
performing mathematical equations in Velocity; when a non-integer is
used, it is logged and a null will be returned as the output.
- </p>
- <p>
- Velocity has a built-in way of dealing with division by zero. In the
- following example:
- </p>
- <div align="left">
- <table cellspacing="4" cellpadding="0" border="0">
- <tr>
- <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif"
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
- <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
- <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif"
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
- </tr>
- <tr>
- <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
- <td bgcolor="#ffffff"><pre>
-#set( $foo = 5 )
-#set( $bar = $foo - 5 )
-#set( $uhoh = $foo / $bar )
-$uhoh
-</pre></td>
- <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
- </tr>
- <tr>
- <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif"
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
- <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
- <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif"
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
- </tr>
- </table>
- </div>
- <p>
- The reference <em>$uhoh</em> is assigned the value of five divided
- by zero. When Velocity renders this template, the output will be:
- </p>
- <div align="left">
- <table cellspacing="4" cellpadding="0" border="0">
- <tr>
- <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif"
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
- <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
- <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif"
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
- </tr>
- <tr>
- <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
- <td bgcolor="#ffffff"><pre>
-$uhoh
-</pre></td>
- <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
- </tr>
- <tr>
- <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif"
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
- <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
- <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif"
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
- </tr>
- </table>
- </div>
- <p>
- Designers should note that <em>set</em> produces strings, which
- must be converted to integers to be used by the range operator.
- This example shows such a conversion:
- </p>
- <div align="left">
- <table cellspacing="4" cellpadding="0" border="0">
- <tr>
- <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif"
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
- <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
- <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif"
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
- </tr>
- <tr>
- <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
- <td bgcolor="#ffffff"><pre>
-#set($a = "7")
-#set($b = $int.valueOf($a) + 10)
-$b
-</pre></td>
- <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
- </tr>
- <tr>
- <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif"
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
- <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
- <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif"
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
- </tr>
- </table>
- </div>
- <p>
- Yields the result <em>17</em>.
</p>
</blockquote>
</td></tr>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>