Difference between revisions of "Nothing"
Line 24: | Line 24: | ||
That's all folks! | That's all folks! | ||
− | ''You may want also to learn how to write a "Hello World" program in Oberon ==> [[Hello World | + | ''You may want also to learn how to write a "Hello World" program in Oberon ==> [[Hello World|Hello World tutorial]]'' |
Latest revision as of 03:33, 5 December 2014
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; BEGIN 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
./nothing
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