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 #43992 is a reply to message #43848] Fri, 06 May 2005 08:30 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Hjalti Sig wrote:
> Thank you guys. The f77_unformatted fixed the problem. The IDL
> documentation however says this keyword is UNIX specific (see below),
> and I am running on a windows XP. So the documentation does not seem
> quite accurate about this...?

I'd be more forgiving about the IDL documentation in this case because the common Fortran
behaviour for sequential, unformatted I/O (4-byte markers at begin and end of record) is
not stipulated by the Fortran standard (at least, anywhere I can find it). I think most
vendors decided that the current system was the most efficient to satisfy those things
that *are* standardised. It is not guaranteed that every Fortran compiler on every
platform will produce sequential, unformatted files the same way (e.g. some older systems
only use 2-byte record markers. Some only put markers at the beginning of the record).
Over time, fortuitously, a "defacto" standard for sequential, unformatted file formats has
come to pass - most likely due to customer complaints to maverick Fortran compiler vendors
to pull their finger out and get their act together.

The Unix reference is maybe due to people sharing files between SGIs, Suns, IBMs, etc back
when those workstation type of machines were all the rage and customers wanted the file
sharing to be independent of the vendor platform/compiler? Then again, I've never really
used a Windows machine (for anything important) so who knows?

paulv

>
> F77_UNFORMATTED
> Unformatted variable-length record files produced by UNIX FORTRAN
> programs contain extra information along with the data in order to
> allow the data to be properly recovered. This method is necessary
> because FORTRAN input/output is based on record-oriented files, while
> UNIX files are simple byte streams that do not impose any record
> structure. Set the F77_UNFORMATTED keyword to read and write this
> extra information in the same manner as f77(1), so that data to be
> processed by both IDL and FORTRAN. See UNIX-Specific Information for
> further details.
> ---------------
>
> Regards, Hjalti


--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
[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: Fri Oct 10 03:16:15 PDT 2025

Total time taken to generate the page: 0.00596 seconds