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

Home » Public Forums » archive » READF: Input conversion error.
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: READF: Input conversion error. [message #91390 is a reply to message #91379] Wed, 08 July 2015 06:08 Go to previous messageGo to previous message
Priyadarsini Sivaraj is currently offline  Priyadarsini Sivaraj
Messages: 15
Registered: June 2015
Junior Member
On Tuesday, 7 July 2015 12:43:43 UTC-4, Paul van Delst wrote:
> Hello,
>
> On 07/07/15 11:53, Priyadarsini Sivaraj wrote:
>> On Tuesday, 7 July 2015 11:39:52 UTC-4, David Fanning wrote:
>>> Priyadarsini Sivaraj writes:
>>>
>>>> I have a problem again with the code above..All of a sudden, I keep getting this error,
>>>> 'READF: End of file encountered.'
>>>>
>>>> At the line,
>>>>
>>>> 'READF, lun1, id, x, y, lat, lon'
>>>>
>>>> in the loop,
>>>>
>>>> WHILE ~EOF(lun1) DO BEGIN
>>>> READF, lun1, id, x, y, lat, lon
>>>> pt = [id,x,y,lat,lon]
>>>> points = [points , pt]
>>>> ENDWHILE
>>>>
>>>> What can be done to overcome this error?Please do help me.
>>>
>>> I would say make sure the file contains what you *think* it contains.
>>> You are probably mistaken. :-)
>>>
>>> Cheers,
>>>
>>> David
>>> --
>>> David Fanning, Ph.D.
>>> Fanning Software Consulting, Inc.
>>> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>>> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
>>
>> Yes.My file does contain all the necessary information. The exact
>> codesnippet has worked earlier.Now, I am not able to deduce what could be
>> the fault. :-(
>
> If the code worked before then the only other thing that has changed is
> the file itself, no?
>
> The error message you are getting is quite clear - you're trying to read
> past the end of the file.
>
> You could try looking at using the ON_ERROR (or setting up an exception
> handler with CATCH) command to print out the values of id, x, y, lat,
> and lon *after* the error has occurred to see if they are what they
> should be.
>
> Also, you could print out the values after they are read successfully,
> too. It might be a lot of output to screen, but it can't hurt while
> you're debugging.
>
> cheers,
>
> paulv

Yes.The new file had extra space at the end.I failed to notice it.Now its working.Thank you..
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: cw_form widget offset
Next Topic: READ, adn get data into an array from LARGE SIZE FILES

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

Current Time: Wed Oct 08 17:05:45 PDT 2025

Total time taken to generate the page: 0.00634 seconds