A couple of questions:luowy wrote:Code: Select all
ELSIF (x.class = Nmop) & (x.subcl = conv) & (DevCPT.Included(f, x.left.typ.form) OR DevCPT.Included(f, g) (*>>>*)&(x.left.typ.form # Real64) (*<<<*))
- A don't understand the workings of the compiler, but I guess this is equivalent to using ENTIER to convert a REAL to a LONGINT, then discarding any bits above 31, but keeping those below. That seems to be the case from the few experiments I have done. Is that correct?
- For REAL numbers that are in the range [MIN(INTEGER) .. MAX(INTEGER) + 1), where the existing code already returns the correct answer, is the new code slower or faster, bigger or smaller?
I still think that the inconsistency between doing "SHORT ENTIER" in 1 or 2 lines can be confusing, and can waste time trying to figure out why one's code is producing unexpected behaviour. Maybe the best solution is not to change the compiler, but to document these surprises, maybe in a new section of the Platform-Specific-Issues document? I would also consider recording other suprises, such as "33 IN {1} = TRUE", with a clear note that these are compiler, platform, and date specific, and not parts of the language to be relied upon.