Documentation #124
unexpected change of range-check for SHORT(ENTIER(real)) instruction
Status: | In Progress | Start date: | 08/22/2016 | ||
---|---|---|---|---|---|
Priority: | Normal | Due date: | |||
Assignee: | Robert Campbell | % Done: | 90% | ||
Category: | - | ||||
Target version: | 1.7 |
Description
according the language report ENTIER(real-val) return LONGINT, SHORT(longint-val) return INTEGER so SHORT(ENTIER(real-val)) will return INTEGER; the current BB compiler has a range-check for ENTIER(real), the real should can be round into a valid LONGINT. otherwise will trap;but this is not documented. the Robert's example let us known the expression SHORT(ENTIER(real)) has change the range-check from LONGINT to INTEGER, IMO, it is a bad idea,it broken the ENTIER() defination,confuse user and harmful for code's rubost. for expression SHORT(ENTIER(real)), the logic should be: ENTIER(real) reutrn LONGINT, whith range-check (LONGINT );SHORT(longint) return INTEGER.
- LuoWe (http://forum.blackboxframework.org/viewtopic.php?f=33&t=495&p=4408#p4408)
Subtasks
Related issues
Associated revisions
Range check for SHORT) was fixed by LuoWy, bug was found by Robert Campbell. Refs: #124.
Range check for SHORT) fix was improved by LuoWy. Refs: #124.
Free registers for the previous fix. Refs: #124.
One more fix for compiler exeptions handling. Refs: #124.
History
#1 Updated by Ivan Denisov 6 days ago
- Description updated (diff)
#2 Updated by Ivan Denisov 6 days ago
- Tracker changed from Bug to Documentation
- Assignee changed from WenYing Luo to Robert Campbell