将Printf.Printf与Uint64.Uint64类型OCAML一起使用
我使用OPAM安装了UInt64包。我想知道如何将UInt64类型打印到屏幕上。我试过了将Printf.Printf与Uint64.Uint64类型OCAML一起使用,ocaml,Ocaml,我使用OPAM安装了UInt64包。我想知道如何将UInt64类型打印到屏幕上。我试过了 let someVal = Uint64.of_string "0xcbf39ce214111325" Printf.printf "%u" someVal; 这就是我得到的错误 This expression has type Uint64.uint64 ref but an expression was expected of type int %u指定一个int参数。查看Uint6
let someVal = Uint64.of_string "0xcbf39ce214111325"
Printf.printf "%u" someVal;
这就是我得到的错误
This expression has type Uint64.uint64 ref
but an expression was expected of type int
%u指定一个int参数。查看Uint64接口,您可能希望通过转换为字符串进行打印:printf%s Uint64.to_string…显然,你们是同一个班级的学生,