The following is a valid µOCCAM program that performs I/O. This is a very basic program demonstrating program I/O. The program takes 3 integer inputs and outputs the average of the 3.
-- Calculate Average Program INT a : INT b : INT c : INT average : SEQ stdin ? a stdin ? b stdin ? c PAR a := a + b a := a + c average := a / 3 stdout ! average
When provided with this input:
1 2 3
it should generate the following output: