2.2.2 Programming Environment

If everything worked out fine, the Oz Programming Interface (OPI) should look like this:

The screen is split in two parts: The upper window - called Oz - is used to write small pieces of code that you want to feed to the compiler. If you open an existing file with Oz code, you should do it here too. The lower window shows the Oz compiler.

To see how all of this works, let's try it in a little example. In the upper window, type:

{Show 'Hello World!'}

Notice that Oz is case-sensitive! It won't work if you write ``show'' or ``SHOW''.

Now you have to feed this line to the compiler. You can do this either by choosing ``Feed Line'' out of the menu ``Oz'' or by using the shortcut ``C-. C-l''. This shortcut looks terrible at the beginning, but you will get used to it easily. This notation means you have to press the key ``control'' (or ``strg'') and ``.'' at the same time and then ``control'' and ``l''. There are only a few shortcuts you should remember:

So if you feed {Show 'Hello World!}into the compiler, it will output:

But to see ``Hello World!'' shown somewhere, you have to switch to the Oz Emulator. You do this by selecting the buffer *Oz Emulator* from the menu buffers. And there you see the result of the command:

Now try a more interesting example! Switch back to the Oz-buffer (by selecting ``Oz'' from the buffer menu) and type:

{Browse 'Hello World!'}

and feed it to the compiler. A new window then appears:

This time the result is not printed in the * Oz Emulator* buffer, but in this new window which is called Oz Browser.


Denys Duchier, Claire Gardent and Joachim Niehren
Version 1.2.4 (20020829)