I am so old that I have run afoul of low digit unit numbers
in fortran for nearly 40 years. Either DEC, who used 1 and
2 for standard input-output, or IBM who used 5 and 6, (and
used other low numbers for other things) taught me to always
start with 10 or above for unit numbers I assigned myself.
I don't know if this is your problem but in trying to
correct it, I would change the unit number first and try it.
(Software development IS an experimental pursuit!)
Gene Wheeler
Herff Professor of Structural Mechanics
Civil Engineering Department
The University of Memphis
[log in to unmask]
----- Original Message -----
From: Darima Lamazhapova <[log in to unmask]>
To: <[log in to unmask]>
Sent: Monday, October 23, 2000 9:23 AM
Subject: Re: about EOF
> May be I should discribe the problem in detail.
> There is a program with a lot of statements like the
following:
> do while(.not. EOF(1))
> READ(1,'(A)') Tmp
> end do
> But the intrinsic funcion EOF does not exist. So, it is
necessary to
> write EOF function to make the program work. I tried the
following
> function:
> logical function EOF(Unit)
> integer, intent(in) :: Unit
> integer ErrCode
> INQUIRE(Unit, iostat=ErrCode)
> if (ErrCode<0) then
> EOF = .true.
> else
> EOF = .false.
> end if
> end function EOF
> But after reading the last record in the file checking the
file with this
> EOF function returns .false. As a result "READ" reads
after the end of
> file and error occurs.
>
>
> > -----Original Message-----
> > >Hello!
> > >In Microsoft extension to ANSI Fortran 90 standart
there are intrinsic
> > >EOF function. Is it possible to write similar function
in fortran
> > >language for IRIX and HP machines? I tried to check the
file with
> IQIURE
> > >and READ functions, but it seems that they are not
suitable for this
> > >task.
> > >Darima.
>
>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|