home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sgi
- Path: sparky!uunet!math.fu-berlin.de!news.th-darmstadt.de!misch
- From: misch@rbhp90.rbg.informatik.th-darmstadt.de (Clemens Misch)
- Subject: Re: Help for my binary read !!!
- Sender: news@news.th-darmstadt.de (The Usenet-News System)
- Message-ID: <1992Aug13.083442.33835@news.th-darmstadt.de>
- Date: Thu, 13 Aug 1992 08:34:42 GMT
- Distribution: usa
- Reply-To: misch@rbhp90.rbg.informatik.th-darmstadt.de
- References: <Aug.12.15.40.21.1992.3094@paul.rutgers.edu>
- Nntp-Posting-Host: rbhp90.rbg.informatik.th-darmstadt.de
- Organization: Rechnerbetriebsgruppe FB20; TH Darmstadt (Germany)
- Keywords: binary file read
- Lines: 26
-
-
- In article <Aug.12.15.40.21.1992.3094@paul.rutgers.edu>, slu@paul.rutgers.edu (shen lu) writes:
- > B
- > 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)
-
- [ code deleted ]
-
- >
- > Interestingly, the c-code will give me the following results:
- > 16 40 60 17
- > ^^
- > (What's is 16 doing here ? )
-
- It happens that 16 is 4 * sizeof(long). Can it be, that fortran
- maintains a 'filesize' in the first longword of a file?
- Just a guess.
- --
- ===============================================================================
- Clemens Misch Rechnerbetriebsgruppe FB20
- Merckstrasse 25
- EMail: misch@rbhp90.rbg.informatik.th-darmstadt.de W6100 Darmstadt (Germany)
- Tel.: +49 6151 163514
- ===============================================================================
-