The following is a simple example of an interactive calculator session in hoc; highlighted text represents hoc's output:
And a simple example of functions and flow control: