Re: file copy routine



Below uses "stream" i/o which is standard with F2003
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


.



Relevant Pages

  • Re: file copy routine
    ... You are guaranteed an exact copy with identical #bytes in new file as old ... but until F2003 compilers become more ... You probably have stream i/o syntax available as an extension in your F95. ...
    (comp.lang.fortran)
  • Re: file copy routine
    ... 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. ... That's pretty nice, but until F2003 compilers become more commonplace, I think I will stick with F95. ...
    (comp.lang.fortran)
  • Re: The Decline of C/C++, the rise of X
    ... > added in, as in Delphi. ... > as C# is like a Delphi bred with java language i'll stick it in there. ... I believe there are native compilers even for Java, ... >> the syntax level this can be done by providing more expressive ...
    (comp.programming)
  • Declaration to get 8-bit (or 16-bit) integer?
    ... Supported by all the current compilers that I've tried it on. ... Not likely to become standard in the foreseeable future. ... Syntax standard-conforming, but semantics not guaranteed of course. ... The meaning of the code not obvious to anyone but a Fortran guru. ...
    (comp.lang.fortran)
  • Re: Declaration to get 8-bit (or 16-bit) integer?
    ... INTEGER*1:: abyte! ... Supported by all the current compilers that I've tried it on. ... Not likely to become standard in the foreseeable future. ... Syntax standard-conforming, but semantics not guaranteed of course. ...
    (comp.lang.fortran)