我想创建一个音频播放器。我需要列出所有电话簿中的所有音频文件
screen2 = Array.new(25) { Array.new(25, 0) }
# at this point, screen2 is an array of arrays, with values of 0
for i in 0...25 do
# this conditional changes the elements in the outer array to be strings
# not arrays!
if i == 0 || i == 24
screen2[i] = '$-----------------------$'
else
screen2[i] = '| |'
end
end
# here, screen2 is an array of strings, not an array of arrays. This
# allows my above explanation to become relevant.