[问题] 读档

楼主: DMFC (DMFC)   2014-06-20 16:10:24
请问
一般来说fortran要读档
都必须要先 open
或是用 read(5,*)
执行过程程式会等待你给予数值
比方
implicit none
read(5,*) a
write(6,*) a
stop
end
编过后,产生 a.out
执行 a.out
程式会停在那里,等你给 a 值
或者也可以把 a 值写在某个档内 (比方 input)
然后执行 a.out < input
就可以省些时间
我想要问
有没有可能把后者的做法 (把 a 值写在 input)
然后执行方法是 a.out input
不用透过 >
而能把 值 输入档程式内?
作者: gilocustom   2014-06-20 16:30:00
#1B4X8FPW
作者: rex0707 (我就是我)   2014-06-20 20:19:00
CALL GET_COMMAND_ARGUMENT(1, input)
楼主: DMFC (DMFC)   2014-06-29 06:26:00
谢谢

Links booklink

Contact Us: admin [ a t ] ucptt.com