[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems reading binary files - pointer at 4096 gives EOF
- Subject: Re: Problems reading binary files - pointer at 4096 gives EOF
- From: davidf(at)dfanning.com (David Fanning)
- Date: Wed, 22 Mar 2000 10:19:47 -0700
- Newsgroups: comp.lang.idl-pvwave
- Organization: Fanning Software Consulting
- References: <firstname.lastname@example.org>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:19006
Oliver Smith (email@example.com) writes:
> I'm working on a program which loads data from a structured binary file.
> file contains many sets of different data types, each data field is
> preceeded by a header(int) and fieldlength (long) before the data itself.
> In order to read the files, I use a WHILE NOT EOF(file) loop as there is no
> indication of the last field in the file. I've hit a major problem with
> this, the EOF test reports end of file whenever the file pointer is at 4096.
Yikes! And I find the same problem in IDL 5.1, IDL 5.2.1, and IDL 5.3.1.
I even find it if I use FSTAT to report the file pointer position.
Please let us know what you find out, Oliver.
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: firstname.lastname@example.org
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155