expressions: modulus or modulo operator?
Steve Lime
Steve.Lime at DNR.STATE.MN.US
Wed Sep 19 11:55:54 PDT 2007
The parser code looks screwed up, probably a bad copy and paste. If you file a bug I will
fix ASAP.
Steve
>>> On 9/19/2007 at 8:13 AM, in message
<e750b12e0709190613t7c499d6ay99729d69a49a2b07 at mail.gmail.com>, Michael Schulz
<mschulz at WEBGIS.DE> wrote:
> Hi,
>
> first of all: mapserver 5 rocks. THX.
>
> I have one question: I found in the history.txt that the "modulus"
> operator is supported by expressions. Now I am uncertain what is
> meant:
>
> - "modulus" the absolute value of a number without a sign or
> - "modulo" the rest of an integer division, usually expressed with the
> operator "%"
>
> When i looked in mapparser.y i found this line:
> 345: math_exp '%' math_exp { $$ = (int)$1 * (int)$3; }
>
> This looks like the modulo operator is defined, but the calculation is
> not modulo.
>
> Can someone shed some light on this?
>
> I am trying to classify isolines with the expression ([iso-value] %
> 10) and it should draw all iso lines that are dividable by 10 without
> a rest, e.g. for giving them a thicker line width. But it nevertheless
> draws all lines.
>
> Cheers, Michael
More information about the MapServer-users
mailing list