[Oberon] Negative integer literals in Oberon

August Karlstrom fusionfile at gmail.com
Sun Apr 26 13:52:09 CEST 2020

On 2020-04-26 11:14, Joerg wrote:
> In earlier Oberon versions, variable integer size was supported: INTEGER 
> and LONGINT. LONGINT is not officially supported in Oberon-07 but the 
> compiler internally declares TYPE LONGINT = INTEGER.
> The concept of variable integer size is not supported in Oberon-07 
> anymore. Every INTEGER has one (implementation dependent) size, be it 16 
> or 32 or 64 or ...

In principle a compiler could use arbitrary-precision arithmetic for the 
numeric types.

> If you use the hex suffix H to fill up the bits of the underlying 
> INTEGER, you need to know the INTEGER size and are per definition in the 
> grey, non-portable, implementation-dependent area of coding

As far as I understand, the large hexadecimal literals we are discussing 
here are typically used for addresses in low-level modules, and when 
implementing such a module you need to assume a few things about the 
implementation and the system, so general portability is not to be 
expected anyway.

-- August

More information about the Oberon mailing list