Re: file copy routine
- From: John <gh14tq5@xxxxxxxxx>
- Date: Tue, 20 May 2008 20:10:39 +0900
GaryScott wrote:
On May 19, 6:42 am, John <gh14...@xxxxxxxxx> wrote:David Frank wrote:Below uses "stream" i/o which is standard with F2003That's pretty nice, but until (complete) F2003 compilers become more
but in CVF and several other compilers using following syntax:
You are guaranteed an exact copy with identical #bytes in new file as old
file.
! -----------------
program file_copy
character :: ch
open (11,file='text.old',form='binary')
open (22,file='text.new',form='binary')
do
read (11,end=101) ch
write (22) ch
end do
101 stop
end program
commonplace, I think I will stick with F95. Still, I look forward to
getting my hands on a F2003 compiler that implements the full standard.
John- Hide quoted text -
- Show quoted text -
The conversion to F2003 once a compiler is available is trivial. Many
times people waste far more time trying devise a "standard conforming"
solution when a trivial extension such as this will suffice for the
particular problem at hand.
Yes, but where I work, there are various Fortran compilers and the code needs to work on all of them. Of the ones we have, I think only g95 and gfortran have any F2003 extensions at all. We usually only use these for development because the executables are slower than our other compilers.
John
.
- Follow-Ups:
- Re: file copy routine
- From: James Van Buskirk
- Re: file copy routine
- References:
- file copy routine
- From: John
- Re: file copy routine
- From: John
- Re: file copy routine
- From: David Frank
- Re: file copy routine
- From: John
- Re: file copy routine
- From: GaryScott
- file copy routine
- Prev by Date: Re: I need help about IF command
- Next by Date: Re: g95 writes 0.232699336-309 instead of 0.000000000E+00
- Previous by thread: Re: file copy routine
- Next by thread: Re: file copy routine
- Index(es):
Relevant Pages
|