console
本頁內容尚未翻譯。
machine.Console
Section titled “machine.Console”record ConsoleThe standard streams: unread input, written output and error output, and the flags of the last reads.
machine.Console.ofInput
Section titled “machine.Console.ofInput”def Console.ofInput (text : String) : ConsoleA console that will read the given text, with nothing written yet.
machine.Console.write
Section titled “machine.Console.write”def Console.write (text : String) (c : Console) : ConsoleWrites text to the standard output of c.
machine.Console.writeError
Section titled “machine.Console.writeError”def Console.writeError (text : String) (c : Console) : ConsoleWrites text to the standard error of c.
machine.Console.feed
Section titled “machine.Console.feed”def Console.feed (more : List Char) (c : Console) : ConsoleAppends more input after what c has not read yet.
machine.Console.consumed
Section titled “machine.Console.consumed”def Console.consumed (rest : List Char) (c : Console) : ConsoleRecords that a read left rest of the input of c.
machine.Console.markFailed
Section titled “machine.Console.markFailed”def Console.markFailed (c : Console) : ConsoleRecords in c that a read failed.
machine.Console.markAtEnd
Section titled “machine.Console.markAtEnd”def Console.markAtEnd (c : Console) : ConsoleRecords in c that a read reached the end of the input.
machine.Console.writeOutput
Section titled “machine.Console.writeOutput”def Console.writeOutput (text : String) (c : Console) : (Console.write text c).output = String.append c.output textWriting text to c appends it to the output.
machine.Console.feedInput
Section titled “machine.Console.feedInput”def Console.feedInput (more : List Char) (c : Console) : (Console.feed more c).input = append c.input moreFeeding more to c adds it after the unread input.