[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems reading binary files - pointer at 4096 gives EOF
Liam Gumley (Liam.Gumley@ssec.wisc.edu) writes:
> A simple test case worked fine for me in IDL 5.3 / Windows98:
> IDL Version 5.3 (Win32 x86). (c) 1999, Research Systems, Inc.
> IDL> openw, 1, 'zzz.dat' & writeu, 1, bytarr(16384) & close, 1
> IDL> openr, lun, 'zzz.dat', /get_lun
> IDL> point_lun, lun, 4096L
> IDL> print, eof(lun)
> IDL> info = fstat(lun)
> IDL> print, info.cur_ptr
> Am I missing something?
You know what this is? It just occurred to me.
This is that same old file pointer bug Wayne Landsman
alerted us to on at least two occasions now. I have
*got* to make time to write some more articles for my
web page. I'm forgetting more IDL these days than I
have learned. :-(
Anyway, this program can be fixed by adding a BINARY
keyword to the OPENR statement when you are reading the
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: email@example.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155