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

Home » Public Forums » archive » File pointer problem on PC-IDL
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: File pointer problem on PC-IDL [message #14632 is a reply to message #14602] Thu, 18 March 1999 00:00 Go to previous messageGo to previous message
menakkis is currently offline  menakkis
Messages: 37
Registered: June 1998
Member
landsman@stars.gsfc.nasa.gov (Wayne Landsman) wrote:
<...>
> Basically, then internal file position is getting screwed up. I open a
> binary file, readu 2880 bytes, and find myself located 4095 bytes into the
> file.
<...>

Wayne, don't ask me why, but ask your remote user to include the switch
/NOAUTOMODE in the OPEN call.

Oh well, it's hard to turn down any opportunity to pick on RSI for this
little Windows feature of theirs. :-) It has bothered me since the day it
sidled onto the scene, announced - as it were - somewhere in the bowels of
the readme file. Basically IDL's I/O on Windows has a "text mode" and a
"binary mode". One of these (the "binary" mode, would you believe?) fools
around with <CR><LF> pairs. For some reason your EOF check is triggering IDL
to switch to "binary" mode or something. (I haven't checked, but it seems
unlikely to me that your file would have enough <CR><LF> pairs to fool with
to account for the discrepancy - it looks more like a bug.) Another strange
thing is that (in this case) if you use the /BINARY switch in the OPEN call
it will also fix the problem. (I don't even want to speculate on this one.)


Peter Mason

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: test for ENVI running in IDL code
Next Topic: 9 dimensions arrays

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

Current Time: Sat Oct 11 08:50:20 PDT 2025

Total time taken to generate the page: 0.80142 seconds