home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!hp-cv!hp-pcd!hpfcso!pld
- From: pld@hpfcso.FC.HP.COM (Paul Dineen)
- Newsgroups: comp.sys.hp
- Subject: Re: Re: Help for my binary read !!!
- Message-ID: <7371234@hpfcso.FC.HP.COM>
- Date: 19 Aug 92 00:02:18 GMT
- Article-I.D.: hpfcso.7371234
- References: <123040008@hpcupt3.cup.hp.com>
- Organization: Hewlett-Packard, Fort Collins, CO, USA
- Lines: 25
-
- > > 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
- ^
- sequential
- > beginning and end of each record.
-
-
- You can see what's in the file by using od(1):
-
- > od -d xxx
- 0000000 00000 00016 00000 00040 00000 00060 00000 00017
- 0000010 00000 00001 00000 00016
- 0000018
-
-
- If you used direct access then you wouldn't have to skip over the length
- words:
-
- > od -d yyy
- 0000000 00000 00040 00000 00060 00000 00017 00000 00001
- 0000020
-