Re: [xsl] Implicit casting from double to float

Subject: Re: [xsl] Implicit casting from double to float
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Wed, 7 Jan 2009 15:55:02 +0530
On Wed, Jan 7, 2009 at 3:28 PM, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:
> I guess it's more like:
> Double d = 1e4;
> Float f = d.floatValue();

This is a Java syntax for extracting float contents (perhaps, with
loss of information) from a double value, and assigning to a float

My point was that, float = double assignment gives a compilation error
with Java.

But a
float = double   assignment works with XSLT 2.0 without giving any
warning or a error.

It seems to me, Java has a stricter static typing rules than XSLT 2.0.

Mukul Gandhi

Current Thread