home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!wupost!usc!sdd.hp.com!hpscdc!hplextra!hpcc05!hpcuhb!hpcuhe!cary
- From: cary@hpcuhe.cup.hp.com (Cary Coutant)
- Newsgroups: comp.sys.hp
- Subject: Re: Help for my binary read !!!
- Message-ID: <31480225@hpcuhe.cup.hp.com>
- Date: 13 Aug 92 17:58:54 GMT
- References: <Aug.12.15.40.21.1992.3094@paul.rutgers.edu>
- Organization: Hewlett Packard, Cupertino
- Lines: 19
-
- > Dear netters:
- > I have the following c-code which reads in a binary file
- > generated by Fortran program write: write(10) n1,n2,n3,n4
- > (Here, n1=40,n2=60, n3=17, n4=1)
-
- When Fortran does unformatted I/O, it puts a record length at the
- beginning and end of each record. You're writing 16 bytes (four
- words), so the file should contain six words:
-
- 16
- 40
- 60
- 17
- 1
- 16
-
- Cary Coutant
- Hewlett-Packard
- California Language Lab
-