home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / hp / 9294 < prev    next >
Encoding:
Internet Message Format  |  1992-08-14  |  827 b 

  1. Path: sparky!uunet!dtix!darwin.sura.net!wupost!usc!sdd.hp.com!hpscdc!hplextra!hpcc05!hpcuhb!hpcuhe!cary
  2. From: cary@hpcuhe.cup.hp.com (Cary Coutant)
  3. Newsgroups: comp.sys.hp
  4. Subject: Re: Help for my binary read !!!
  5. Message-ID: <31480225@hpcuhe.cup.hp.com>
  6. Date: 13 Aug 92 17:58:54 GMT
  7. References: <Aug.12.15.40.21.1992.3094@paul.rutgers.edu>
  8. Organization: Hewlett Packard, Cupertino
  9. Lines: 19
  10.  
  11. > Dear netters:
  12. >    I have the following c-code which reads in a binary file
  13. >    generated by Fortran program write: write(10) n1,n2,n3,n4
  14. >    (Here, n1=40,n2=60, n3=17, n4=1)
  15.  
  16. When Fortran does unformatted I/O, it puts a record length at the
  17. beginning and end of each record.  You're writing 16 bytes (four
  18. words), so the file should contain six words:
  19.  
  20.     16
  21.     40
  22.     60
  23.     17
  24.     1
  25.     16
  26.  
  27. Cary Coutant
  28. Hewlett-Packard
  29. California Language Lab
  30.