Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要从 SML 文件中读取字符。我有这段代码用于读取整数:
fun readInt input = Option.valOf (TextIO.scanStream (Int.scan StringCvt.DEC) input)
字符有等效的东西吗?我已经看到有,Char.scan但我不太确定如何使用它。提前谢谢!!
Char.scan
像这样的东西怎么样Option.valOf (TextIO.input1 input)
Option.valOf (TextIO.input1 input)