home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / fortran / 4363 < prev    next >
Encoding:
Internet Message Format  |  1992-11-19  |  2.2 KB

  1. Path: sparky!uunet!mcsun!sunic!corax.udac.uu.se!chiron.astro.uu.se!l
  2. From: l@chiron.astro.uu.se (Lars Kamel)
  3. Newsgroups: comp.lang.fortran
  4. Subject: Re: extra 8 bytes
  5. Date: 18 Nov 1992 08:28:33 GMT
  6. Organization: Uppsala University
  7. Lines: 39
  8. Distribution: world
  9. Message-ID: <1ecurhINNogd@corax.udac.uu.se>
  10. References: <1992Oct20.204145.27333@uceng.UC.EDU> <1e8i03INNecd@corax.udac.uu.se> <1992Nov17.200054.22236@newshost.lanl.gov>
  11. NNTP-Posting-Host: chiron.astro.uu.se
  12.  
  13. In article <1992Nov17.200054.22236@newshost.lanl.gov>, jlg@cochiti.lanl.gov (J. Giles) writes:
  14. |> In article <1e8i03INNecd@corax.udac.uu.se>, l@chiron.astro.uu.se (Lars Kamel) writes:
  15. |> |> I have had the same problem when programming on a VAX/VMS system. Based on
  16. |> |> my expirence, I propose that you change your code to (if your compiler
  17. |> |> allows it):
  18. |> |>       open( 10, file=file1, form='unformatted', recordtype='fixed',
  19. |> |>      +          access='direct', recl=1000)
  20. |> |>       write( 10, rec=1) (real(i),i=1,1000)
  21. |> 
  22. |> Please not that the above conforms to the standard with two exceptions:
  23. |> 
  24. |> 1) the `recordtype' specifier is not standard
  25. |> 
  26. |> 2) technically, the standard only accepts upper case letters ;-)
  27. |> 
  28. |> On most implementations, you can use lower case. On most applications,
  29. |> the record length information is not written to disk for direct access
  30. |> files.  Few implementations hav the recordtype specifier.
  31. |> 
  32. |> Note that a standard conforming implementation is not *required* to
  33. |> omit the record length marks for direct access files.  It's just that
  34. |> most of them do.  If yours doesn't, you'll have to write a non-Fortran
  35. |> filter to get rid of them after Fortran is done.
  36. |> 
  37. |> This subject *should* be covered in the FAQ for this newsgroup.  So
  38. |> far I've not seen one consistently posted though.
  39. |> 
  40. |> -- 
  41. |> J. Giles
  42.  
  43. 1) I did not remember what is standard and what is VAX extensions. Perhaphs
  44. it works without the recordtype specifier, if the compiler doesn't support it.
  45.  
  46. 2) Of course, if your compiler is case-sensitive, use only capital letters.
  47.  
  48. 3) I realize that I forgot to multiply with the four bytes/element. The
  49. recordlength should be specified as RECL=4000.
  50.  
  51. Lars Kamel (lars@laban.uu.se)
  52.