[問題] 想問一個簡單的例子 讀檔案
想問一個簡單的例子
program test
real,dimension(11)::a
open(unit=10,file='number.txt',status='old')
read(10,*) a
write(*,*) a
end
number.txt裡面有 10個數字
我想把10個數字讀進去a裡面在輸出到螢幕
無奈這邊卻出錯 請問這樣是否可行
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.116.189.152
→
04/18 19:24, , 1F
04/18 19:24, 1F
→
04/19 00:38, , 2F
04/19 00:38, 2F
→
04/19 00:38, , 3F
04/19 00:38, 3F
→
04/19 00:38, , 4F
04/19 00:38, 4F
→
04/19 00:38, , 5F
04/19 00:38, 5F
→
04/19 00:39, , 6F
04/19 00:39, 6F
→
04/19 00:51, , 7F
04/19 00:51, 7F
→
04/20 14:03, , 8F
04/20 14:03, 8F
→
04/20 22:07, , 9F
04/20 22:07, 9F
推
04/21 12:21, , 10F
04/21 12:21, 10F
推
04/21 16:39, , 11F
04/21 16:39, 11F
討論串 (同標題文章)
Fortran 近期熱門文章
PTT數位生活區 即時熱門文章