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

  1. 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
  2. From: l@chiron.astro.uu.se (Lars Kamel)
  3. Newsgroups: comp.lang.fortran
  4. Subject: Re: extra 8 bytes
  5. Date: 16 Nov 1992 16:24:35 GMT
  6. Organization: Uppsala University
  7. Lines: 32
  8. Distribution: world
  9. Message-ID: <1e8i03INNecd@corax.udac.uu.se>
  10. References: <1992Oct20.204145.27333@uceng.UC.EDU>
  11. NNTP-Posting-Host: chiron.astro.uu.se
  12.  
  13. In article <1992Oct20.204145.27333@uceng.UC.EDU>, juber@uceng.UC.EDU (James Uber) writes:
  14. |> When using fortran to write unformated data, e.g.
  15. |> 
  16. |>     open( 10, file=file1, form='unformated')
  17. |>     write( 10 ) (real(i),i=1,1000)
  18. |> 
  19. |> i get a file length of 4008 bytes, or 8 bytes too much.
  20. |> I never really cared before, but now i want to use
  21. |> these unformatted data files in another visualization
  22. |> system that has the capability to read "raw" data.
  23. |> I can get around the 4 extra bytes on the front and
  24. |> back of the file within this system, by telling it
  25. |> to skip the first word and so on, but is there a way
  26. |> to tell fortran unformatted write not to do this?
  27. |> Or, is it an operating system thing?
  28. |> 
  29. |> Thank you,
  30. |> jim uber
  31. |> univ. of cincinnati
  32. |> juber@uceng.uc.edu
  33. |> -- 
  34. |> --
  35. |> james uber
  36. |> juber@uceng.uc.edu
  37. I have had the same problem when programming on a VAX/VMS system. Based on
  38. my expirence, I propose that you change your code to (if your compiler
  39. allows it):
  40.       open( 10, file=file1, form='unformatted', recordtype='fixed',
  41.      +          access='direct', recl=1000)
  42.       write( 10, rec=1) (real(i),i=1,1000)
  43.  
  44. Lars Kamel (lars@laban.uu.se)
  45.