Re: [Firebird-devel] Hex notation bug with SMALLINT

2013-08-05 Thread paul
I wrote: > ... > So, with hindsight (always easy), it would have been better never to > interpret > unsigned input as signed numbers. After all, if people want to enter a > negative > number in hex form, they can use a minus sign. etc. Sorry for the bad text formatting in my previous message. I

Re: [Firebird-devel] Hex notation bug with SMALLINT

2013-08-04 Thread paul
Hi all, Mark Rotteveel wrote: >>> And I wondered if it isn't a bug that hex values with 1-4 digits are >>> integer and not smallint. Or at least: shouldn't the engine have enough >>> context information to correctly convert 0x8000 to a smallint -32768 >>> instead of an integer 32768? >>> >> >> I

Re: [Firebird-devel] Hex notation bug with SMALLINT

2013-08-04 Thread Dmitry Yemanov
04.08.2013 11:20, Mark Rotteveel wrote: > > Ok, lets not call it a bug, but an area of potential improvement: based > on the context it should be possible to deduce that the literal should > be a smallint. Therefor it should be possible to handle 0x8000 as -32768 > when assigned to a smallint and

Re: [Firebird-devel] Hex notation bug with SMALLINT

2013-08-04 Thread Mark Rotteveel
On 4-8-2013 01:44, Adriano dos Santos Fernandes wrote: > On 03-08-2013 03:55, Mark Rotteveel wrote: >> I just saw this question on Stackoverflow >> http://stackoverflow.com/questions/18026907/firebird-insert-hex-values-into-tables-arithmetic-exception >> >> And I wondered if it isn't a bug that hex

Re: [Firebird-devel] Hex notation bug with SMALLINT

2013-08-03 Thread Adriano dos Santos Fernandes
On 03-08-2013 03:55, Mark Rotteveel wrote: > I just saw this question on Stackoverflow > http://stackoverflow.com/questions/18026907/firebird-insert-hex-values-into-tables-arithmetic-exception > > And I wondered if it isn't a bug that hex values with 1-4 digits are > integer and not smallint. Or