....
do ....
read(filename, "(a256)") cline
read(cline, *) array(i: i+n)
enddo
捕获.PNG (28.27 KB, 下载次数: 218)
276 Bytes, 下载次数: 2
....
mod_n=mod(nowner,10) !// 10 each row, mod_n: remaining number of last row
j=1 !//j: index of ARRAY owner, assigning 10 values each time
do i=1, nowner/10
read(FILENAME, "(a256)") cline
read(cline, *) owners(j: j+9)
j=1+10*i
enddo
read(FILENAME, "(a256)") cline
read(cline, *) owners(nowner+1-mod_n: nowner)
.....
胡文刚 发表于 2021-9-14 21:58
read(filename, *) owners
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |