1
while { $index < $num } {
set arr(index) [gets stdin]
incr index
}
這是我的代碼。雖然試圖輸出特定陣列的值,我得到的錯誤說:如何從TCL鍵盤輸入數組?
can't read "arr(2)": no such element in array
while executing
"puts $arr($index)"