[Oberon] Type compatibility in Oberon

Joerg joerg.straube at iaeth.ch
Fri May 1 16:42:37 CEST 2020


If the system uses a 32bit CPU and the Oberon compiler spits an error on
  i := 2500000000;
saying „nbr too big“ I accept it, as the Oberon report does not specify the size of an INTEGER;

But I find it strange that the very same compiler allows
   i := 9502F900H;
that is - according to my reading of the Oberon report - the same as the first statement.

Basically, the above compiler allows decimal literals from 0 to 2.147 billion, but hex literals from 0 to 4.29 billion.

In my point of view, what the compiler does is what the programmer of low level modules expects from hex notation. It would help if the Oberon report would clarify the semantic.

Don’t misunderstand me: the hex notation is useful (especially for low level programming), and it would be cumbersome being forced by a strict compiler to use -6AFD0700H just to reach the same goal.

br
Jörg

> Am 01.05.2020 um 15:41 schrieb Joerg <joerg.straube at iaeth.ch>:
> 



More information about the Oberon mailing list