这是子程序的strlenstrlen实际在做什么?
subroutine strlen(string,i1,i2)
character string*(*)
do 10 i=len(string),1,-1
if(string(i:i).ne.' ')then
i2=i
goto 11
endif
10 continue
11 do 20 i=1,len(string)
if(string(i:i).ne.' ')then
i1=i
return
endif
20 continue
return
end
在主
if(nfil.lt.0)then
call strlen(cpar,i1,i2)
open(unit=10,file=cpar(i1:i2),status='old')
如果CPAR声明 字符CPAR *(*)
是否存在有关的名称的任何规则或限制cpar将被正确打开?
我的hx263on.sens(cpar)无法读取。为什么?
在主程序中'cpar'将需要超出'cpar *(*)'的声明。你能找到吗? – francescalus
cpar等于“hx263on.sens(cpar)”还是等于“hx263on.sens”或实际上是什么?多久了?你如何试图打印它? –
@VladimirF不,实际上我已命名文件hx263on.sens.I使用此文件作为输入文件,但无法读取它。 –