I use IVF 11.0.075.
Hi, everybody
program main
USE IFPORT
I = SYSTEMQQ('del fort.86')
I = SYSTEM('Process.bat') !This 'Process.bat' will output fort.86
open(11,file='fort.86',status='old',form='binary')
do j=1,100
read(11,end=1)x
print *,x
enddo
1 stop
end
In Process.bat, it contains 'start file.exe'.
I try it in Debug mode with breakpoint in every step. It works ok.
I've noticed that the file can be deleted; batch file running and new
fort.86 can be read.
But if I run it, then it shows in command window: 'file not found fort.
86'. Another message window show 'Debug Assertion Failed!'. But the
''Process.bat' is running and finished.
The error message shows the line "open(11,file='fort.
86',status='old',form='binary')" has a problem.
I suspect it doesn't wait the Process.bat finished.
Any suggestion is welcome.
Mike
Oh, I forgot to say I use MS Windows XP.
Mike
Maybe including the /wait parameter with the start command fixes this.
Try 'start /wait file.exe' in your batch file. (I assume file.exe is the
program which creates the fort.86 file.)
(See:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx?mfr=true
)
Erik.
Or remove "start" altogether, leaving just "file.exe"...
--
Qolin
Email: my qname at domain dot com
Domain: qomputing
Yes. it works. Thanks a lot.
Mike