home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!batcomputer!munnari.oz.au!mel.dit.csiro.au!mineng.dmpe.CSIRO.AU!dmsmelb.mel.dms.CSIRO.AU!alan
- From: alan@dmsmelb.mel.dms.CSIRO.AU (Alan Miller)
- Subject: Re: Fortran unformat format???
- Message-ID: <1992Jul30.022125.18030@dmpe.csiro.au>
- Sender: usenet@dmpe.csiro.au
- Nntp-Posting-Host: dmsmelb.mel.dms.csiro.au
- Organization: CSIRO, Div. of Mathematics & Statistics, Melbourne, Vic., AUSTRALIA
- References: <1992Jul28.221417.1176@mic.ucla.edu>
- Date: Thu, 30 Jul 1992 02:21:25 GMT
- Lines: 30
-
- In article <1992Jul28.221417.1176@mic.ucla.edu> shinn@agsm.ucla.edu (Shinn-Tzong Wu) writes:
- >I tried to write a C program to read a Lahey (F77L3) generated unformatted
- >file, but I could not find any document (either in Lahey or Microsoft)
- >about how to decode the header (FD 13 00 00 00 etc), worse, Lahey's
- >format is different from Microsoft's! Would anyone please shed some
- >light in how to find the doc? Thanks.
- >
- >
- >Shinn
-
- My manual for Lahey's Fortran gives the format!
-
- In part, it says:
-
- Unformatted sequential files begin with a 1-byte header with hex value "FD".
- A record-length indicator appears at the beginning and end of each record.
- At the beginning:
- The lower two bits of the first byte indicate the number of additional bytes
- (0-3) that will follow. The upper 6 bits are low order bits of the record
- length. The following byte (if indicated) contains the next 8 bits of
- record length, and so forth.
-
- The difference between the starting and end record lengths seems to be the
- length of the beginning record length indicator.
-
- --
- Alan Miller, Quality Improvement Project
- CSIRO Division of Mathematics & Statistics, Melbourne, Australia
- Phone: +61 3 542-2266 Fax: +61 3 542-2474 E-mail: alan@mel.dms.csiro.au
- Mail: CSIRO DMS, Private Bag 10, Clayton, Vic. 3168, Australia
-