想問一點fortran 的問題
在shell script裡面
主程式(command) 後面接的字串 內定就叫$1 $2 ...etc
所以 可以用這樣的方式給shell script 的程式當作input
那請問fortran可以嗎?
也就是
$./a.out cmd
以cmd作為 a.out的輸入字串
當fortran 裡面寫
read(*,*)的時候
實際的執行會是跑到下一行
在讓終端機輸入
有試過 $./a.out < cmd
可是回應是 cmd: No such file or directory
請問有辦法用指令後面的字串給fortran 輸入嗎?
謝謝
--
在shell script裡面
主程式(command) 後面接的字串 內定就叫$1 $2 ...etc
所以 可以用這樣的方式給shell script 的程式當作input
那請問fortran可以嗎?
也就是
$./a.out cmd
以cmd作為 a.out的輸入字串
當fortran 裡面寫
read(*,*)的時候
實際的執行會是跑到下一行
在讓終端機輸入
有試過 $./a.out < cmd
可是回應是 cmd: No such file or directory
請問有辦法用指令後面的字串給fortran 輸入嗎?
謝謝
--
All Comments