My code looks something like this:
fun get infile = ( TextIO.output(TextIO.stdOut, prompt) ; TextIO.flushOut(TextIO.stdOut) ; TextIO.inputLine infile )
Returns a value of type string option ; usually the line is SOME l , but NONE at the end of the file.
source share