frankpfenning / C0

C0 Language
4 stars 0 forks source link

Revise IO library #16

Closed robsimmons closed 11 years ago

robarnold commented 11 years ago

What's the motivation for revising it?

frankpfenning commented 11 years ago

One bug fix was necessary so we could detect EOF on stdin.

In our implementation of the reverse polish calculator ("claclab") we couldn't prompt the user for an expression, because we had no way to flush the stdout output buffer.

I think these are the only "required" fixes. Beyond that, there was some feedback from 213 that students didn't know how to use stdio functions, so I think it is worthwhile to see if there are other things we'd want to change.

One thing in particular that is annoying on occasion is that we cannot write any files. That used to be a feature, when we are running the student's code with our id's on Andrew, but with Autolab we could generalize the interface. For the Huffman lab, it would be nice to be able to read a file, encode it, and write the coded file, for example.

robsimmons commented 11 years ago

flush() has been added to conio in 179.

robsimmons commented 11 years ago

Closed for now, required changes made, won't modify library further for Spring 2012.