Project

General

Profile

Actions

Feature #124

closed

unexpected change of range-check for SHORT(ENTIER(real)) instruction

Added by I. Denisov about 9 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Target version:
-
Start date:
08/22/2016
Due date:
% Done:

50%

Estimated time:

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)

Actions #1

Updated by I. Denisov about 9 years ago

  • % Done changed from 90 to 50
  • Assignee changed from R. Campbell to W. Luo
Actions #2

Updated by I. Denisov about 9 years ago

  • Tracker changed from Documentation to Feature
  • Target version deleted (1.7)
Actions #3

Updated by I. Denisov over 8 years ago

  • Status changed from In Progress to Rejected
Actions

Also available in: Atom PDF