Oz Tutorial 002: interactive Mozart

/*
Start ~/Mozart/bin/oz.exe now, or go to Part 1

Using /* followed by */ enter a comment block that spans a few lines. That is to say, type text in the empty upper pane.
Then type the following */

{Browse [1 3 5]}

/* as a separate line of code. It will follow the comment block just as seen above.


From the Oz menu, select ‘Feed Line’


  The output string [1 3 5] should appear in a Browser window.


TIP: If you make a CTRL-key error in the edit buffer, Ctrl-g will quit that cmd sequence.
Now enter    */

{Browse 42|nil}

/*   as another line of code.
Now select the 2 lines of code by holding down your ’select’ mouse button.
Now click ‘Feed Region’ on the Oz menu.
2 lines of output should appear in the Browser window:    */

[1 3 5]
[42]

/*If the 2 lines of code were separated from other text by blank lines, then you could try ‘Feed Paragraph’

If you do not see the ‘Oz’ menu on the toolbar, then that buffer does not have focus; click in the buffer area if your Oz code is visible or select ‘Oz’ from the ‘Buffers’ menu


To learn emacs select ‘Emacs Tutorial’ from the ‘Help’ menu.    */

Leave a Reply

You must be logged in to post a comment.