home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!sdd.hp.com!spool.mu.edu!sol.ctr.columbia.edu!ira.uka.de!math.fu-berlin.de!unidui!rrz.uni-koeln.de!Germany.EU.net!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: 16 Nov 1992 16:24:35 GMT
- Organization: Uppsala University
- Lines: 32
- Distribution: world
- Message-ID: <1e8i03INNecd@corax.udac.uu.se>
- References: <1992Oct20.204145.27333@uceng.UC.EDU>
- NNTP-Posting-Host: chiron.astro.uu.se
-
- In article <1992Oct20.204145.27333@uceng.UC.EDU>, juber@uceng.UC.EDU (James Uber) writes:
- |> When using fortran to write unformated data, e.g.
- |>
- |> open( 10, file=file1, form='unformated')
- |> write( 10 ) (real(i),i=1,1000)
- |>
- |> i get a file length of 4008 bytes, or 8 bytes too much.
- |> I never really cared before, but now i want to use
- |> these unformatted data files in another visualization
- |> system that has the capability to read "raw" data.
- |> I can get around the 4 extra bytes on the front and
- |> back of the file within this system, by telling it
- |> to skip the first word and so on, but is there a way
- |> to tell fortran unformatted write not to do this?
- |> Or, is it an operating system thing?
- |>
- |> Thank you,
- |> jim uber
- |> univ. of cincinnati
- |> juber@uceng.uc.edu
- |> --
- |> --
- |> james uber
- |> juber@uceng.uc.edu
- 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)
-
- Lars Kamel (lars@laban.uu.se)
-