getinput.f
来自「网络带宽测试工具」· F 代码 · 共 29 行
F
29 行
Subroutine getInput( inc, maxinc, minc )! ----------------------------------------------------------------------! --- Reads cases to be done by program 'mod1d' and determines the! actual number of cases. ! Alerts when more than 'maxinc' cases are given in the input file.! ---------------------------------------------------------------------- Implicit None Integer :: maxinc, minc Integer :: inc(maxinc) Integer :: ninc = 1! ----------------------------------------------------------------------! --- Open input file. Open( 1, File = 'mod1d.in' ) Do Read( 1, *, End = 10 ) inc(ninc) ninc = ninc + 1 If ( ninc > maxinc ) Then Print *, ' Too many input values: increase maxinc in', & ' program mod1d.' Stop End If End Do 10 minc = ninc - 1! ---------------------------------------------------------------------- End Subroutine getInput
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?