home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / sgi / 12325 < prev    next >
Encoding:
Text File  |  1992-08-12  |  1.6 KB  |  42 lines

  1. Newsgroups: comp.sys.sgi
  2. Path: sparky!uunet!math.fu-berlin.de!news.th-darmstadt.de!misch
  3. From: misch@rbhp90.rbg.informatik.th-darmstadt.de (Clemens Misch)
  4. Subject: Re: Help for my binary read !!!
  5. Sender: news@news.th-darmstadt.de (The Usenet-News System)
  6. Message-ID: <1992Aug13.083442.33835@news.th-darmstadt.de>
  7. Date: Thu, 13 Aug 1992 08:34:42 GMT
  8. Distribution: usa
  9. Reply-To: misch@rbhp90.rbg.informatik.th-darmstadt.de
  10. References:  <Aug.12.15.40.21.1992.3094@paul.rutgers.edu>
  11. Nntp-Posting-Host: rbhp90.rbg.informatik.th-darmstadt.de
  12. Organization: Rechnerbetriebsgruppe FB20; TH Darmstadt (Germany)
  13. Keywords: binary file read
  14. Lines: 26
  15.  
  16.  
  17. In article <Aug.12.15.40.21.1992.3094@paul.rutgers.edu>, slu@paul.rutgers.edu (shen lu) writes:
  18. > B
  19. > Dear netters:
  20. >    I have the following c-code which reads in a binary file
  21. >    generated by Fortran program write: write(10) n1,n2,n3,n4
  22. >    (Here, n1=40,n2=60, n3=17, n4=1)
  23.  
  24. [ code deleted ]
  25.  
  26. >  Interestingly, the c-code will give me the following results:
  27. >      16 40 60 17  
  28. >      ^^
  29. >      (What's is 16 doing here ? )
  30.  
  31. It happens that 16 is 4 * sizeof(long). Can it be, that fortran
  32. maintains a 'filesize' in the first longword of a file?
  33. Just a guess.
  34. --
  35. ===============================================================================
  36. Clemens Misch                                        Rechnerbetriebsgruppe FB20
  37.                                                      Merckstrasse 25 
  38. EMail: misch@rbhp90.rbg.informatik.th-darmstadt.de   W6100 Darmstadt (Germany)
  39. Tel.: +49 6151 163514
  40. ===============================================================================
  41.