Path: news.mathworks.com!newsfeed-00.mathworks.com!oleane.net!oleane!news.ecp.fr!feeder.eternal-september.org!eternal-september.org!not-for-mail
From: dpb <none@non.net>
Newsgroups: comp.lang.fortran,comp.soft-sys.matlab
Subject: Re: Fortran formatted read problem (for matlab MEX file)
Date: Fri, 06 Nov 2009 13:55:37 -0600
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <hd1v00$kib$1@news.eternal-september.org>
References: <7af025a1-6d40-4458-aab0-35bc43418c00@i12g2000prg.googlegroups.com> 	<hd1sg5$u5k$1@news.eternal-september.org> <d039a82a-256d-411d-a100-2b07c196cb0f@2g2000prl.googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.eternal-september.org U2FsdGVkX19WT0VUe0KEfjzxt8pHq7YbLnD74pU30lylQpP1JSzML1ORcoVJRiPMsyooGbpaTatlAn/kHn1/FEgTbMcP501rjuRUWRJ2qDfbfy/GOHQnyJDgjYz/kjxsOTNWrhmCjNiiwGZFYOVYNA==
X-Complaints-To: abuse@eternal-september.org
NNTP-Posting-Date: Fri, 6 Nov 2009 19:55:45 +0000 (UTC)
In-Reply-To: <d039a82a-256d-411d-a100-2b07c196cb0f@2g2000prl.googlegroups.com>
X-Auth-Sender: U2FsdGVkX18+k0YBqEDDcr05RSfewn0OwHVpGi0nfiU=
Cancel-Lock: sha1:fDBKQQE2OHtqoQvte4rPt8F+mYo=
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
Xref: news.mathworks.com comp.lang.fortran:213337 comp.soft-sys.matlab:583100


Nathan wrote:
...
> Hm. Alright. My data files do contain tabs, as I wanted to make them
> in a readable format. (They were created through Matlab, after reading
> in real data sheets and extracting information). Perhaps I'll try to
> find a way to remedy that first. Thanks for pointing that out to me. I
> think I understand how the formatting is supposed to work now, but
> I'll definitely be back when more errors occur.

Well, fixing that is pretty easy, just don't write tabs... :)

> My variable declarations are spread across multiple files, I think.
> (The code I am working on was passed down to me by previous student
> interns, and I am still trying to figure it out. I have no fortran
> experience beyond the last couple of months, reading this code)
> 
> Some of my variables seem to just appear out of nowhere, with no data
> type declaration... Could this be a problem?
...

Possibly, remember implicit typing rules are i-n are integers by default.

The strongest thing to do would be to add

IMPLICIT NONE

to each routine, but that will undoubtedly require quite some time to 
sort out all the errors that will suddenly show up.  But, then again, it 
could potentially find real errors as well.

The arrays will have to have been declared somewhere/somehow in order to 
have become arrays.  One would presume they were declared as floats of 
default or double precision, but then again, mistakes have been known to 
be made...

--