[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
The Scary Oberon Adder :-)
Hi!
I am not sure *why* exactly this "contest" got started, but here is
the contribution that will surely take last place. I assume it will
prove that Oberon is not "light-weight" according to the meaning of
the term on this list. Enjoy! :-)
Peter
MODULE Adder;
IMPORT Out;
VAR a: PROCEDURE Add( x, y: INTEGER ): INTEGER;
PROCEDURE Add( x, y: INTEGER ): INTEGER;
BEGIN
RETURN x + y
END Add;
BEGIN
a := Add;
Out.Integer( a( 3, 5 ) );
END Adder;
PS: The only good thing might be that almost *everybody* will be
able to read this code...
--
Peter H. Froehlich @ http://www.ics.uci.edu/~pfroehli/