- From: Per Bothner <per@bothner.com>
 - Date: Mon, 23 Jun 2003 08:32:36 -0700
 - To: Bas de Bakker <bas@x-hive.com>
 - CC: www-ql@w3.org
 
Bas de Bakker wrote:
> I suggest giving literals like [0-9]* type xs:int and
> defining arithmetic on long, int, short, byte as in Java.
An alternative is to change the semantics of arithmetic operations such 
that if the operands are xs:int the operation is done using 32-bit 
arithmetic, and that casts to xs:int just gets the lower 32 bits without 
error checking.  Then for example:
define function f ($x as xs:int, $y as xs:integer) as xs:int {
   $x + $y + 1
}
In this case both additions can be done using 32-bit arithmetic.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/
Received on Monday, 23 June 2003 11:31:01 UTC