--- Kris Schneider <[EMAIL PROTECTED]> 的正文:> Good
call. One other thing to take away from this is
> that no matter which way
> works for you, it's a pretty expensive way to do
> integer division ;-). If you
> can, it's probably a better idea to just do the
> division in a servlet or MVC
> componen
Good call. One other thing to take away from this is that no matter which way
works for you, it's a pretty expensive way to do integer division ;-). If you
can, it's probably a better idea to just do the division in a servlet or MVC
component and store the result in a separate scoped variable befor
You could also use parseNumber with the integerOnly flag, so...
This somewhat depends whether you just need output to display 2 or if
you actually want the number 2 to use elsewhere.
Kris Schneider wrote:
Right (sort of). Here's what the spec has to say about division:
Binary operator - A
Right (sort of). Here's what the spec has to say about division:
Binary operator - A {/} B
If A and B are null, - return 0
Coerce both A and B to Double and apply operator
If operator results in exception, error
In addition, here's some info from java.text.DecimalFormat:
DecimalFormat uses
>i declare 2 variables,then i want to do some
>calculate.the result is 2.4 here,but my desire result
>is 2.
How about using JSTL's standard tag?
MATSUHASHI
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional command
see my code as below:
i declare 2 variables,then i want to do some
calculate.the result is 2.4 here,but my desire result
is 2.
in old jsp,i can use parseInt() method to parse the
variable first.but how to do it in jstl?
i know it maybe a easy problem,but it really confuse
me,i am a newbie in js