You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Daniel Westheide <da...@gmx.de> on 2008/04/29 13:19:36 UTC
[JEXL] Integer division
Hello,
in the JEXL syntax reference - http://commons.apache.org/jexl/reference/syntax.html - it says that the div operator can be used to perform an integer division. In the example, "4 div 3" is supposed to give 1.
However, when I use the div operator in JEXL 1.0 or 1.1, its behaviour is identical to that of the division operator "/" - integer division simply seems not to be possible in JEXL. Is this a bug or is the documentation simply outdated?
Any help would be very much appreciated.
Best regards,
Daniel
--
Psst! Geheimtipp: Online Games kostenlos spielen bei den GMX Free Games!
http://games.entertainment.gmx.net/de/entertainment/games/free
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: [JEXL] Integer division
Posted by Dion Gillard <di...@trongus.com>.
It does seem the docs are out of whack...maybe a bug was introduced during
the 1.0 phase....
I should check the tests
On Wed, Apr 30, 2008 at 3:17 AM, Rahul Akolkar <ra...@gmail.com>
wrote:
> On 4/29/08, Daniel Westheide <da...@gmx.de> wrote:
> > Hello,
> >
> > in the JEXL syntax reference -
> http://commons.apache.org/jexl/reference/syntax.html - it says that the
> div operator can be used to perform an integer division. In the example, "4
> div 3" is supposed to give 1.
> >
> > However, when I use the div operator in JEXL 1.0 or 1.1, its behaviour
> is identical to that of the division operator "/" - integer division simply
> seems not to be possible in JEXL. Is this a bug or is the documentation
> simply outdated?
> >
> <snip/>
>
> A quick look at the JEXL parser code seems to suggest that div and /
> are treated equivalently by the parser.
>
> Unless anyone chimes in WRT that bit of documentation about integer
> division (and/or the original intent for the operators), seems the
> docs need to be changed.
>
> -Rahul
>
>
>
> > Any help would be very much appreciated.
> >
> > Best regards,
> >
> > Daniel
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
--
dIon Gillard
"Any sufficiently advanced technology is indistinguishable from magic" -
Arthur C. Clarke 1917 - 2008
Re: [JEXL] Integer division
Posted by Rahul Akolkar <ra...@gmail.com>.
On 4/29/08, Daniel Westheide <da...@gmx.de> wrote:
> Hello,
>
> in the JEXL syntax reference - http://commons.apache.org/jexl/reference/syntax.html - it says that the div operator can be used to perform an integer division. In the example, "4 div 3" is supposed to give 1.
>
> However, when I use the div operator in JEXL 1.0 or 1.1, its behaviour is identical to that of the division operator "/" - integer division simply seems not to be possible in JEXL. Is this a bug or is the documentation simply outdated?
>
<snip/>
A quick look at the JEXL parser code seems to suggest that div and /
are treated equivalently by the parser.
Unless anyone chimes in WRT that bit of documentation about integer
division (and/or the original intent for the operators), seems the
docs need to be changed.
-Rahul
> Any help would be very much appreciated.
>
> Best regards,
>
> Daniel
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org