标签: arrays ocaml
我正在尝试在数组中记录用户的输入 然而它在说我:
line 5, characters 0-3: Error: Syntax error
我不明白为什么,因为for的语法似乎没问题 所以这是代码:
for
let n = read_int() let ar_of_int = Array.make n 0 for i = 0 to n - 1 do let b = read_int () ar_of_int.(i) <- b done