W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2013

Re: XQuery FOTS fn-function-arity-017

From: Michael Kay <mike@saxonica.com>
Date: Sat, 18 May 2013 15:59:56 +0100
Cc: "public-qt-comments@w3.org" <public-qt-comments@w3.org>
Message-Id: <F984296F-47AD-472E-BDE6-1A46D1687471@saxonica.com>
To: Paul J. Lucas <paul@lucasmail.org>

The semantics of this reduce to the question of what happens if the query contains an integer literal that's too big for the implementation to handle. The current rules for integer literals say the effect is the same as casting the string to an integer, and the rules for casting say this is a dynamic error FOAR0002. We looked at changing it to a static error, since it can be detected statically, but decided to make no change because it might be useful for the query to be able to catch the error. We could have changed to a different dynamic error, but it only complicates the spec (and potentially implementations) to say that the semantics are the same as casting except that the error codes are different.

Michael Kay

On 17 May 2013, at 20:14, Paul J. Lucas wrote:

> Why is one of the expected results of this test FOAR0002?  To me, overflow means what happens during the calculation of some arithmetic operation, not simply "this number is already too big."
> Why not FORG0001 or FOCA0003?
> - Paul
Received on Saturday, 18 May 2013 15:00:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:43 UTC