Path: news.mathworks.com!newsfeed-00.mathworks.com!news.kjsl.com!usenet.stanford.edu!news.ucr.edu!nntp-server.caltech.edu!not-for-mail
From: glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups: comp.lang.fortran,comp.soft-sys.matlab
Subject: Re: Fortran formatted read problem (for matlab MEX file)
Date: Fri, 6 Nov 2009 20:40:05 +0000 (UTC)
Organization: California Institute of Technology, Pasadena
Lines: 21
Message-ID: <hd21j5$h90$5@naig.caltech.edu>
References: <7af025a1-6d40-4458-aab0-35bc43418c00@i12g2000prg.googlegroups.com> <hd1sg5$u5k$1@news.eternal-september.org> <d039a82a-256d-411d-a100-2b07c196cb0f@2g2000prl.googlegroups.com> <hd1v00$kib$1@news.eternal-september.org> <dd6e3ab8-fd69-4aba-bfc7-377b2392841d@f1g2000prf.googlegroups.com>
NNTP-Posting-Host: thalia.ugcs.caltech.edu
X-Trace: naig.caltech.edu 1257540005 17696 131.215.176.116 (6 Nov 2009 20:40:05 GMT)
X-Complaints-To: abuse@caltech.edu
NNTP-Posting-Date: Fri, 6 Nov 2009 20:40:05 +0000 (UTC)
User-Agent: tin/1.9.3-20080506 ("Dalintober") (UNIX) (Linux/2.6.26-2-686 (i686))
Xref: news.mathworks.com comp.lang.fortran:213345 comp.soft-sys.matlab:583114


In comp.lang.fortran Nathan <ngreco32@gmail.com> wrote:
(big snip)

> The only one I might be concerned with is the E format terms regarding
> numbers such as:
>     9.7160E+02 and the like.
> I used the format statement %E15.4  such that from the first white
> space until the last digit (2), there are 15 characters and 4
> decimals. Is that correct?

That sounds right.  For input the .4 doesn't do anything unless
there are no decimal points in the input data.  In the days of
cards it was not unusual to specify card columns as before and
after an implied decimal point.  It works fairly well for F format
(no exponent) input, but I would not recommend it at all with
an exponent.  

(The music generation program recently discussed reads in a large
data file with no decimal points.)

-- glen