home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / fortran / 2896 < prev    next >
Encoding:
Text File  |  1992-07-30  |  1.8 KB  |  43 lines

  1. Newsgroups: comp.lang.fortran
  2. 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
  3. From: alan@dmsmelb.mel.dms.CSIRO.AU (Alan Miller)
  4. Subject: Re: Fortran unformat format???
  5. Message-ID: <1992Jul30.022125.18030@dmpe.csiro.au>
  6. Sender: usenet@dmpe.csiro.au
  7. Nntp-Posting-Host: dmsmelb.mel.dms.csiro.au
  8. Organization: CSIRO, Div. of Mathematics & Statistics, Melbourne, Vic., AUSTRALIA
  9. References: <1992Jul28.221417.1176@mic.ucla.edu>
  10. Date: Thu, 30 Jul 1992 02:21:25 GMT
  11. Lines: 30
  12.  
  13. In article <1992Jul28.221417.1176@mic.ucla.edu> shinn@agsm.ucla.edu (Shinn-Tzong Wu) writes:
  14. >I tried to write a C program to read a Lahey (F77L3) generated unformatted
  15. >file, but I could not find any document (either in Lahey or Microsoft)
  16. >about how to decode the header (FD 13 00 00 00 etc), worse, Lahey's
  17. >format is different from Microsoft's!  Would anyone please shed some
  18. >light in how to find the doc?  Thanks.
  19. >
  20. >
  21. >Shinn
  22.  
  23. My manual for Lahey's Fortran gives the format!
  24.  
  25. In part, it says:
  26.  
  27. Unformatted sequential files begin with a 1-byte header with hex value "FD".
  28. A record-length indicator appears at the beginning and end of each record.
  29. At the beginning:
  30. The lower two bits of the first byte indicate the number of additional bytes
  31. (0-3) that will follow.   The upper 6 bits are low order bits of the record
  32. length.   The following byte (if indicated) contains the next 8 bits of
  33. record length, and so forth.
  34.  
  35. The difference between the starting and end record lengths seems to be the
  36. length of the beginning record length indicator.
  37.  
  38. -- 
  39. Alan Miller, Quality Improvement Project
  40. CSIRO Division of Mathematics & Statistics, Melbourne, Australia
  41. Phone: +61 3 542-2266   Fax: +61 3 542-2474  E-mail: alan@mel.dms.csiro.au
  42. Mail: CSIRO DMS, Private Bag 10, Clayton, Vic. 3168, Australia
  43.