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/NJ 和 MLton(非交互式)上运行的 sml 程序。当我在 sml 文件中使用打印语句时,SML/NJ 总是添加
val it = () : unit
到输出,这会使输出混乱。MLton 不这样做。
有没有办法删除这个输出?我试过 CM_VERBOSE=false,但没有帮助。
运行 SML/NJ v110.73。
如果没有产生此代码的示例,很难提供帮助,但是您的“问题”似乎与此问题有些相关。
总之,记住将所有结果值绑定到某个东西,这样it变量就不会被分配给结果:
it
val _ = print "fooo"