From vishap oberon compiler
Revision as of 03:33, 5 December 2014 by Antranigv (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Deutsch (de) | English (en) | հայերեն (hy)

An Oberon program consists of the word MODULE, then the name you choose to call the program followed by declarations, if any, of special things you wish to use in the program, then BEGIN followed by the program instructions, then END followed by the name of the program and a period. All words that are a permanent part of Oberon-2 must be capitalized.

The simplest program which does nothing is:

MODULE nothing;
END nothing.

So let's open an editor and write that down and save it as nothing.Mod and compile it using voc.

$ voc -m nothing.Mod

We will get an executable file named nothing.

Let's run it by


and nothing happens because the program does nothing.

That's all folks!

You may want also to learn how to write a "Hello World" program in Oberon ==> Hello World tutorial