Computer Science Canada

Pascal Aficionados: Oberon-2

Author:  wtd [ Wed Sep 07, 2005 1:50 am ]
Post subject:  Pascal Aficionados: Oberon-2

http://spivey.oriel.ox.ac.uk/mike/obc/

Oberon is the modern successor to Nicolas Wirth's Pascal programming language. It's a modern procedural language with an emphasis on modules. The compiler is delightfully easy to install and use.

Author:  wtd [ Wed Sep 07, 2005 1:57 pm ]
Post subject: 

Obligatory "Hello world":

code:
module Hello;

IMPORT Out;

BEGIN
   Out.String("Hello world!"); Out.Ln
END Hello.


With a procedure:

code:
MODULE Hello;

IMPORT Out;

PROCEDURE SayHello;
BEGIN
   Out.String("Hello"); Out.Ln
END SayHello;

BEGIN
   SayHello
END Hello.


: