home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / fortran / 4423 < prev    next >
Encoding:
Text File  |  1992-11-23  |  1.6 KB  |  43 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!news.udel.edu!usenet
  3. From: zagar@chester.cms.udel.edu (Randy Zagar)
  4. Subject: Re: extra 8 bytes
  5. Message-ID: <By6IxC.L7L@news.udel.edu>
  6. Sender: usenet@news.udel.edu
  7. Nntp-Posting-Host: chester.cms.udel.edu
  8. Reply-To: zagar@chester.cms.udel.edu
  9. Organization: Marine Studies, University of Delaware
  10. References: <1ecurhINNogd@corax.udac.uu.se>
  11. Date: Mon, 23 Nov 1992 17:22:23 GMT
  12. Lines: 29
  13.  
  14. As has been previously mentioned, the extra 8 bytes at
  15. the beginning of your file is record length information.
  16.  
  17. THIS IS BECAUSE YOUR COMPILER DEFAULTS TO A SEQUENTIAL
  18. ACCESS MODE IF YOU DON'T SPECIFY OTHERWISE.
  19.  
  20. To really fix your problem, you need to pick a record length
  21. for your I/O to the file and use ACCESS='DIRECT' and RECL=####
  22. in your open statement.  For more info, please check your local
  23. F77 docs for direct access I/O.
  24.  
  25. I've used this technique several times under different UNIX Fortrans
  26. and have had no problems.  Files written in this way by F77 apps. *can*
  27. be read by C-lang. applications w/ no problems.
  28.  
  29. -Randy
  30.  
  31.  
  32.  
  33. ---
  34.  
  35.  ____________________________________________________________________________
  36. /                                                                            \
  37. | Randy Zagar                                 Thinking: that waste of time   |
  38. | Internet: zagar@Chester.CMS.UDel.Edu        between seeing something and   |
  39. | Bell-net: 302/831-1139                      knowing what to do about it.   |
  40. \____________________________________________________________________________/
  41.  
  42.  
  43.