Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!apple!bbn!gateway!atc.bendix.COM!DMG%ATC
From: DMG%ATC@atc.bendix.COM ("David M. Goblirsch")
Newsgroups: comp.emacs
Subject: (none)
Message-ID: <33192@bbn.COM>
Date: 7 Dec 88 15:24:00 GMT
Sender: news@bbn.COM
Organization: BBN news/mail gateway
Lines: 61


I have a question about how EMACS handles files that have been
produced by FORTRAN programs.  I am working on VAX/VMS, version 4.6,
with version 18.52 of GNU Emacs.

The following program produces a list of 5 integers to
logical unit 2:

       integer  i
       do 10 i=1,5
          write (2,20) i
  10   continue
  20   format(' ',i5)
       stop
       end

When this file is read into EVE or EDT (the VAX/VMS editors), I get

    1			<-  first line
    2
    3
    4
    5			<-  last line

which is just what I expect to get.  But when this file is read into
Emacs, I get
				
			<- blank first line
    1			<- Then a ^M at the end of each line
    2
    3
    4
    5			<- last line

This file cannot be read by another FORTRAN program once Emacs has
done this.  Now in CCA Emacs, you can delete the first blank line and
strip off the ^M's and write the file out and it can then be read by
other FORTRAN programs.  But with GNU I have not been able to do this,
apparently it just keeps the ^M's in the disk file even though in the
Emacs buffer they appear to be gone.  If I try to read the file after
it has been in GNU, I get the error message

%FOR-F-INPCONERR, input conversion error
  unit 2  file $255$DUA3:[DMG.QUANT]FOR002.DAT;2
  user PC 00000429

What is happening and why?  My current fix is to just run FORTRAN
output files through a PASCAL program that rewrites the file,
eliminating the FORTRAN CARRIAGE CONTROL record attribute.  I do this
because I have been told that I can't change the record attributes for
this file with a simple DCL command.  But this fix seems like it
should be unnecessary; however, I am neither an Emacs nor a computer
expert.  Explanation?

	David M. Goblirsch
	Aerospace Technology Center
	Allied-Signal Aerospace Company
	9140 Old Annapolis Road
	Columbia, MD  21045--1998
	dmg@atc.bendix.com   or   dmg%atc.bendix.com@relay.cs.net
	phone:  (301) 964--4149