[Oberon] Easter eggs in Oberon

August Karlstrom fusionfile at gmail.com
Wed Apr 15 18:43:34 CEST 2020


On 2020-04-13 21:36, Joerg wrote:
> If you write this:
> 
> VAR i: INTEGER;
> i := 4000000;
> i := i * 4000000;
> 
> would you state the result is „undefined“?

If the result is valid or not depends on the restrictions of the 
compiler and the computer. It's the same with, say, the set {0 .. 50}.

> I would say: it wraps around (or overflows) and is identical to.
> 
> i := 1246822400;

It's system dependent, it could also abort the program.


-- August


More information about the Oberon mailing list