作者jsb (jsb)
看板Fortran
標題[問題] 不換行輸出
時間Tue Apr 3 15:55:23 2012
其實是想問 $ 和 \ 哪一個是 fortran 的標準用法。
我用了
write (lout,'(f15.4,\)') value(idat)
在 gfortran 無法 compile 成功,可是
write (lout,'(f15.4,$)') value(idat)
就可以,而且可以達到我想要的樣子。
還是說,兩個都不是標準用法,可能會因為 compiler 產生不相容的問題?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.162.108.113
1F:→ jsb:我也知道 advance='no' 可以用,可是用 \ 或 $ 還是比較方便阿 04/03 15:56
2F:→ Cypresslin:PGF compiler $ OK 04/03 16:33
3F:→ jsb:看來 $ 應該是多數 compiler 都可以接受了. . . 有反例嗎? 04/03 18:17
4F:→ gilocustom:這兩者在90/95/2003/2008的標準書上都沒寫~ 04/04 18:19