comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: readu sees unexpected records
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: readu sees unexpected records [message #43894 is a reply to message #43848] Wed, 04 May 2005 06:55 Go to previous messageGo to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <e1330fff.0505040322.67613e37@posting.google.com>,
hjalti@vatnaskil.is (Hjalti Sig) wrote:

> Hello group
> I found out that when reading unformatted data, written with a fortran
> 90 program, the readu command detects a couple of extra records before
> and after each line written with the fortran program. For example, I
> wrote a 10x10 array, containing the numbers from 1-100 in a file.
> Reading the file using readu, the content of the file appears as a
> 14x10 array, with very small numbers in columns 1, 2, 13 and 14,
> (producing floating underflow), and the correct numbers in the columns
> 3-12.
> In the data file I actually had to read there are three extra records
> before and two after each line.
> These extra records do certainly not appear when reading the files
> with a fortran program.
>
> I was curious if anyone had an explanation of this.
>
> Regards, Hjalti

Fortran I/O is record oriented. Each Fortran unformatted WRITE produces one
record in the output file. The number of data bytes in each record is written
as a 4 byte integer at the beginning and end of each record. You can read the
record lengths yourself, or use the F77_UNFORMATTED keyword.

Ken Bowman
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Auto change window focus (OS X) [BUG]
Next Topic: readu sees unexpected records

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 03:09:14 PDT 2025

Total time taken to generate the page: 1.34409 seconds