Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!helios.physics.utoronto.ca!alchemy.chem.utoronto.ca!system From: system@alchemy.chem.utoronto.ca (System Admin (Mike Peterson)) Newsgroups: comp.lang.fortran Subject: Re: Bug with file I/O? Message-ID: <1991Jan24.145718.28686@alchemy.chem.utoronto.ca> Date: 24 Jan 91 14:57:18 GMT References: Distribution: comp Organization: University of Toronto Chemistry Department Lines: 16 In article quan@sol.surv.utas.edu.au (Stephen Quan) writes: >I ran the following on our SunOS machine, and guess what the output is? > >What is the last value of buff(1)? 10? 0? ... NO, 32!! I need the result >to be 10, can anybody tell me what I am doing wrong? Our Apollo (SR10.2 / ftn 10.7) gives '10' for this program. Looks like a broken compiler to me. Have you tried dumping the 'test.dat' file (with 'od') to see if it is the write or the read that is messing up? As an aside, why not use binary/unformatted direct I/O; it is orders of magnitude faster than formatted I/O on all systems I have ever used? -- Mike Peterson, System Administrator, U/Toronto Department of Chemistry E-mail: system@alchemy.chem.utoronto.ca Tel: (416) 978-7094 Fax: (416) 978-8775