This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Reading and writing binary files
- From: Bud Davis <bdavis9659 at sbcglobal dot net>
- To: gcc-help at gcc dot gnu dot org, bob222 at earthlink dot net
- Date: Tue, 26 Sep 2006 19:57:07 -0700 (PDT)
- Subject: Re: Reading and writing binary files
bob,
unformatted in fortran does not mean 'binary' in the
classical sense of the word....
unformatted is a compiler unique format that has a
header and a trailer record that is used to make
movement in the file efficient. g77 and gfortran use
either a 32 or 64 bit 'record marker' that contains
the size of the record.
both gfortran and g77 have routines for reading a file
a character at a time. look for fgetc and fputc in
the info pages for either compiler.
HTH,
bud