delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/06/03:12:50

Date: Sat, 4 Jul 1998 23:57:51 +0000 ( )
From: "Gurunandan R. Bhat" <grbhat AT unigoa DOT ernet DOT in>
To: pavenis AT lanet DOT lv
Cc: djgpp AT delorie DOT com
Subject: Inconsistencies between g77 v0.5.23 and v0.5.19
In-Reply-To: <B0000032170@stargate.astr.lu.lv>
Message-Id: <Pine.LNX.3.91.980704234402.1824A-100000@aditya.unigoa.ernet.in>
Mime-Version: 1.0

Greetings,

	I found the following behaviour that I cannot explain: When g77 
writes records to an (unformatted) output file, it adds extra an extra 
byte (0x0d) if the filename extension is "out". This causes programs that 
read this (unformatted) file to read garbage. The follwing program shows 
this behaviour on my machine:

	Compare the outputs when the file name is "example.dat" and when
the filename is "example.out" (2nd line). The latter file has an extra
0x0d. 

      dimension idiag(50)
      open(unit=7,file='example.dat',form='unformatted')
      read(*,*)num
      do i=1,num
      idiag(i)=i
      enddo
      write(7)(idiag(i),i=1,num)
      close(7)
      stop
      end

This is not the case with g77 v0.5.19

Thanks in advance

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019