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

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!wupost!zaphod.mps.ohio-state.edu!caen!hellgate.utah.edu!lanl!cochiti.lanl.gov!jlg
  3. From: jlg@cochiti.lanl.gov (J. Giles)
  4. Subject: Re: extra 8 bytes
  5. Message-ID: <1992Nov17.200054.22236@newshost.lanl.gov>
  6. Sender: news@newshost.lanl.gov
  7. Organization: Los Alamos National Laboratory
  8. References: <1992Oct20.204145.27333@uceng.UC.EDU> <1e8i03INNecd@corax.udac.uu.se>
  9. Date: Tue, 17 Nov 1992 20:00:54 GMT
  10. Lines: 28
  11.  
  12. In article <1e8i03INNecd@corax.udac.uu.se>, l@chiron.astro.uu.se (Lars Kamel) writes:
  13. |> I have had the same problem when programming on a VAX/VMS system. Based on
  14. |> my expirence, I propose that you change your code to (if your compiler
  15. |> allows it):
  16. |>       open( 10, file=file1, form='unformatted', recordtype='fixed',
  17. |>      +          access='direct', recl=1000)
  18. |>       write( 10, rec=1) (real(i),i=1,1000)
  19.  
  20. Please not that the above conforms to the standard with two exceptions:
  21.  
  22. 1) the `recordtype' specifier is not standard
  23.  
  24. 2) technically, the standard only accepts upper case letters ;-)
  25.  
  26. On most implementations, you can use lower case. On most applications,
  27. the record length information is not written to disk for direct access
  28. files.  Few implementations hav the recordtype specifier.
  29.  
  30. Note that a standard conforming implementation is not *required* to
  31. omit the record length marks for direct access files.  It's just that
  32. most of them do.  If yours doesn't, you'll have to write a non-Fortran
  33. filter to get rid of them after Fortran is done.
  34.  
  35. This subject *should* be covered in the FAQ for this newsgroup.  So
  36. far I've not seen one consistently posted though.
  37.  
  38. -- 
  39. J. Giles
  40.