> Wolfgang Lenerz wrote:
>>> On an ordinary QL I can type
>>>
>>> f%=-32768/1
>>>
>>> and find that f% now contains -32768.
>>>
>> Well that must be a nice bug.
>>
>> unless I'm mistaken, 32768/1 = 32768
>>
>> and 32768 just doesn't fit in an integer.
>
> Yes, but -32768 does. Notice the minus ;-)
>
> Marcel
As an interesting aside to this, in some QDOS rom versions there was a 
little bug whereby you could either assign the value -32768 to a 
variable and not input it (or possibly vice versa)

LET a%=-32768 would work

INPUT a%    and type in -32768 and you'd get an error message.

Possibly something to do with 2 different range checkings (Simon 
Goodwin did explain it to me at the time but I don't remember where I 
saw it, possibly in his QL World rom bugs articles). AFAIK this only 
ever applied to AH and JM ROMs, and I can't remember which is correct, 
but since range for signed 16bit numbers is -32768 to +32767 it must 
be the INPUT a% which gets it wrong.


_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to