我使用 vscode,带有“OCaml 和 Reason IDE”的扩展
这是我在 utop 中的结果:
utop # 1. = 1. ;;
Line 1, characters 0-2:
Error: This expression has type float but an expression was expected of type
int
Run Code Online (Sandbox Code Playgroud)
对于字符串也同样如此:
utop # "Me" = "Me";;
Line 1, characters 0-4:
Error: This expression has type string but an expression was expected of type
int
Run Code Online (Sandbox Code Playgroud)
除 int 之外的任何内容都相同:
utop # 2 = 2 ;;
- : bool = true
Run Code Online (Sandbox Code Playgroud)
">" "<" 也有同样的症状。我不知道到底发生了什么。谁能帮我吗 ?多谢!