Actually, it's because JSP defines the unknown variable e's type as
integer by default. If you set e = 1.0, you set the type as a float or
double type, and therefore it will work correctly.
On Wed, 2002-05-01 at 06:58, subbu wrote:
> hai,
> try this and give an explanation why this happens
> (JAV
to round to 1.
regards
Mark
-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of subbu
Sent: 01 May 2002 13:58
To: [EMAIL PROTECTED]
Subject: Amazing script
hai,
try this and give an explanation why this happen
> From: subbu [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 01, 2002 9:58 AM
> To: [EMAIL PROTECTED]
> Subject: Amazing script
>
>
> hai,
> try this and give an explanation why this happens
> (JAVASCRIPT)
>
> var a,b,c,d,e
> a=1.1
> b=1.1
> c=1.1
> d=a+
hai,
try this and give an explanation why this happens
(JAVASCRIPT)
var a,b,c,d,e
a=1.1
b=1.1
c=1.1
d=a+b(answer is 2.2)
e=a+b+c(answer is 3.32)
alert(e);
==To
unsubscribe: mailto [EMAIL PROTECTED] with