Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 IDL 中有两个长度相同的数组。我想成对组合这两个数组,以便我可以将这两个数组作为列打印到文件中。这可能吗?
您可以像这样组合两个数组(具有相同的长度n):
combined = [[array1], [array2]]
所以这combined是 nx 2。
combined
尽管您可以在不创建第三个数组的情况下写入数据:
openw, lun, 'path_to_file.ext', /get_lun foreach elem, array1, index do begin printf, lun, elem, array2[index] endforeach free_lun, lun