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