A problem in writting a sequential binary file (compiled with LF95)
- From: "P.Wholey" <p.wholey@xxxxxxxxx>
- Date: 27 Nov 2006 03:52:30 -0800
Hey, Guys:
I met a strange problem in writting a sequential binary file. My code
shown as below is compiled with LF95.
+++++++++++++++++++++++++++++++++++++++++++++++++++
program binarytest
real*8 test(20000)
integer*4 testnum
testnum=1001
do i=1,20000
test(i)=i*i*3./1000.
enddo
OPEN(33, FILE='test', ACCESS='sequential', FORM='binary')
do i=1,testnum
write(33)test(i)
enddo
CLOSE(33)
stop
end
+++++++++++++++++++++++++++++++++++++++++++++++++++
The problem is a little weird. If I give the "testnum" a small value
like 1001, it works well. But If a bigger value e.g. 3000 is given, an
error message as below will appear:
****************************************************************************
An I/O error was detected (system call=write, errno=6, system
message="bad file
number", unit=33).
Program Completed
Press Enter to Continue.
****************************************************************************
And the generated file has less than 8 KB data.
I'm quite confused. Could anyone help me out?
Many thanks in advance!
P. Wholey
.
- Follow-Ups:
- Prev by Date: Re: Dynamic Array Definition problem in f90
- Next by Date: Re: Pet hates
- Previous by thread: interface-implementation separation
- Next by thread: Re: A problem in writting a sequential binary file (compiled with LF95)
- Index(es):