This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gfortran and output file length


The original code would not be fun for you to follow so I did a lot of
debugging and found the essence of the problem that can be demonstrated
using simpler code (see below).  When I examine file 'testout' while the
program is waiting for a response for the option, it is complete up to
writing 9720 values.  When ctrl z is entered, no more is written. Any other
entry and the file will be complete. 

	Program test
	implicit none
	
	INTEGER  k
	Real var(10000)
	character *80 opt
	
	open(unit = 1, file = 'testout')
	
	Do 10 k = 1, 10000
	 var(k)=k
 10	Continue

	WRITE(1, 100) var
	
	write(*,*)'enter option.  Type ctrl z to exit'
	read(*,*,end=110)opt

	
 100	Format(10E15.5)
 110	close(unit=1)
 		STOP
		END




Jerry DeLisle wrote:
> 
> johns wrote:
>> I just compiled a program using gfortran on my imac G5.  The program is
>> supposed to write a bunch of numbers to an output file, however, the file
>> is
>> incomplete.  The data ends after about 90% of the numbers are written. 
>> The
>> file is not that big - about 6 to 7 hundred records and about 48k in
>> size.
>> 
>> Do you know what is going on?
>> 
>> 
> Can't help you if we can't see the code example.
> 
> Jerry
> 
> 

-- 
View this message in context: http://old.nabble.com/gfortran-and-output-file-length-tp28279634p28284061.html
Sent from the gcc - fortran mailing list archive at Nabble.com.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]