[Oberon] Assumed issue in the Lola-2 compiler

rochus.keller at bluewin.ch rochus.keller at bluewin.ch
Sun Apr 14 17:09:26 CEST 2019


>> There are two other issues though:
>> - In MouseP.v line 27 column 45 the hex value was not properly generated

I found the problem.

The original LSV.WriteHex has a signature of (x: LONGINT) with the comment "x >= 0". But in MouseP.Lola line 26 there is a constant 0FFFFFFFFH'32 which seems to be valid Lola-2 and which is internally stored in LSB.ItemDesc.val, also a LONGINT.

As far as I understood the Oberon Language Report 1990 the LONGINT is a signed 32 bit integer type. The type doesn't show up in Oberon-07 anymore, but in this forum I learned that it is still used with the original definition for backward compatibility.  According to this definition 0FFFFFFFFH corresponds to -1.

I would prefer to make the fix in the Oberon source code if possible and to not change the translated C++ code.

@ Paul Reed: Can you confirm this reasoning? Is there an "authorized fix" of LSV.WriteHex to also handle negative x?

Best
R.K.


More information about the Oberon mailing list